File tree Expand file tree Collapse file tree 5 files changed +11
-7
lines changed
test/Transforms/Attributor Expand file tree Collapse file tree 5 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -6628,7 +6628,9 @@ struct AAMemoryLocationFunction final : public AAMemoryLocationImpl {
6628
6628
LLVM_DEBUG (dbgs () << " [AAMemoryLocation] Accessed locations for " << I
6629
6629
<< " : " << getMemoryLocationsAsStr (MLK) << " \n " );
6630
6630
removeAssumedBits (inverseLocation (MLK, false , false ));
6631
- return true ;
6631
+ // Stop once only the valid bit set in the *not assumed location*, thus
6632
+ // once we don't actually exclude any memory locations in the state.
6633
+ return getAssumedNotAccessedLocation () != VALID_STATE;
6632
6634
};
6633
6635
6634
6636
if (!A.checkForAllReadWriteInstructions (CheckRWInst, *this ))
Original file line number Diff line number Diff line change @@ -280,6 +280,7 @@ define void @f7_2(i1 %c) {
280
280
; CHECK-SAME: (i1 [[C:%.*]])
281
281
; CHECK-NEXT: [[PTR:%.*]] = tail call nonnull align 4 dereferenceable(4) i32* @unkown_ptr()
282
282
; CHECK-NEXT: [[A:%.*]] = tail call i32 @unkown_f(i32* nonnull align 4 dereferenceable(4) [[PTR]])
283
+ ; CHECK-NEXT: [[ARG_A_0:%.*]] = load i32, i32* [[PTR]], align 4
283
284
; CHECK-NEXT: [[B:%.*]] = tail call i32 @unkown_f(i32* nonnull align 4 dereferenceable(4) [[PTR]])
284
285
; CHECK-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
285
286
; CHECK: if.true:
Original file line number Diff line number Diff line change @@ -450,10 +450,11 @@ define i32 @irreducible_cfg(i32 %0) {
450
450
; IS________OPM-NEXT: [[TMP14]] = add nsw i32 [[DOT1]], 1
451
451
; IS________OPM-NEXT: br label [[TMP8]]
452
452
; IS________OPM: 15:
453
- ; IS________OPM-NEXT: [[TMP16:%.*]] = bitcast i32* [[TMP3]] to i8*
454
- ; IS________OPM-NEXT: call void @free(i8* nocapture [[TMP16]])
455
- ; IS________OPM-NEXT: [[TMP17:%.*]] = load i32, i32* [[TMP3]], align 4
456
- ; IS________OPM-NEXT: ret i32 [[TMP17]]
453
+ ; IS________OPM-NEXT: [[TMP16:%.*]] = load i32, i32* [[TMP3]], align 4
454
+ ; IS________OPM-NEXT: [[TMP17:%.*]] = bitcast i32* [[TMP3]] to i8*
455
+ ; IS________OPM-NEXT: call void @free(i8* nocapture [[TMP17]])
456
+ ; IS________OPM-NEXT: [[TMP18:%.*]] = load i32, i32* [[TMP3]], align 4
457
+ ; IS________OPM-NEXT: ret i32 [[TMP18]]
457
458
;
458
459
; IS________NPM-LABEL: define {{[^@]+}}@irreducible_cfg
459
460
; IS________NPM-SAME: (i32 [[TMP0:%.*]])
Original file line number Diff line number Diff line change @@ -1920,7 +1920,7 @@ define i32 @main() {
1920
1920
; CHECK-NEXT: [[INC]] = add nuw nsw i32 [[G_0]], 1
1921
1921
; CHECK-NEXT: br label [[FOR_COND_0]]
1922
1922
; CHECK: for.end.0:
1923
- ; CHECK-NEXT: [[CALL:%.*]] = call noalias i8* @malloc(i64 8)
1923
+ ; CHECK-NEXT: [[CALL:%.*]] = call i8* @malloc(i64 8)
1924
1924
; CHECK-NEXT: store i8* [[CALL]], i8** bitcast (%struct.a** @e to i8**), align 8
1925
1925
; CHECK-NEXT: [[B:%.*]] = bitcast i8* [[CALL]] to %struct.a**
1926
1926
; CHECK-NEXT: store %struct.a* null, %struct.a** [[B]], align 8
Original file line number Diff line number Diff line change 1
1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --check-attributes
2
- ; RUN: opt -attributor -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s
2
+ ; RUN: opt -attributor -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=1 -S < %s | FileCheck %s
3
3
;
4
4
; This file is the same as noreturn_sync.ll but with a personality which
5
5
; indicates that the exception handler *can* catch asynchronous exceptions. As
You can’t perform that action at this time.
0 commit comments