Index: llvm/lib/Analysis/ValueTracking.cpp =================================================================== --- llvm/lib/Analysis/ValueTracking.cpp +++ llvm/lib/Analysis/ValueTracking.cpp @@ -5334,6 +5334,15 @@ break; } + case Instruction::Br: + if (cast(I)->isConditional()) + Operands.insert(cast(I)->getCondition()); + break; + + case Instruction::Switch: + Operands.insert(cast(I)->getCondition()); + break; + default: break; } Index: llvm/test/Analysis/ScalarEvolution/exact-exit-count-more-precise.ll =================================================================== --- llvm/test/Analysis/ScalarEvolution/exact-exit-count-more-precise.ll +++ llvm/test/Analysis/ScalarEvolution/exact-exit-count-more-precise.ll @@ -10,7 +10,7 @@ ; CHECK-NEXT: %_tmp25.i = phi i16 [ %in, %bb2 ], [ %_tmp6.i, %bb1.i ] ; CHECK-NEXT: --> {%in,+,1}<%bb1.i> U: full-set S: full-set Exits: 1 LoopDispositions: { %bb1.i: Computable, %bb2: Variant } ; CHECK-NEXT: %_tmp6.i = add nsw i16 %_tmp25.i, 1 -; CHECK-NEXT: --> {(1 + %in),+,1}<%bb1.i> U: full-set S: full-set Exits: 2 LoopDispositions: { %bb1.i: Computable, %bb2: Variant } +; CHECK-NEXT: --> {(1 + %in),+,1}<%bb1.i> U: full-set S: full-set Exits: 2 LoopDispositions: { %bb1.i: Computable, %bb2: Variant } ; CHECK-NEXT: %or.cond = and i1 %_tmp10.i, %exitcond.i ; CHECK-NEXT: --> %or.cond U: full-set S: full-set Exits: true LoopDispositions: { %bb1.i: Variant, %bb2: Variant } ; CHECK-NEXT: Determining loop execution counts for: @test_and @@ -48,7 +48,7 @@ ; CHECK-NEXT: %1 = trunc i64 %indvars.iv to i32 ; CHECK-NEXT: --> -1 U: [-1,0) S: [-1,0) Exits: -1 LoopDispositions: { %BB: Invariant } ; CHECK-NEXT: %2 = add nsw i32 %1, %sum.01 -; CHECK-NEXT: --> {(-1 + undef),+,-1}<%BB> U: full-set S: full-set Exits: -1 LoopDispositions: { %BB: Computable } +; CHECK-NEXT: --> {(-1 + undef),+,-1}<%BB> U: full-set S: full-set Exits: -1 LoopDispositions: { %BB: Computable } ; CHECK-NEXT: %B3 = add i32 %1, %2 ; CHECK-NEXT: --> {(-2 + undef),+,-1}<%BB> U: full-set S: full-set Exits: -2 LoopDispositions: { %BB: Computable } ; CHECK-NEXT: %B = or i1 %C5, %C11 Index: llvm/test/Analysis/ScalarEvolution/limit-depth.ll =================================================================== --- llvm/test/Analysis/ScalarEvolution/limit-depth.ll +++ llvm/test/Analysis/ScalarEvolution/limit-depth.ll @@ -60,7 +60,7 @@ define void @test_sext(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { ; CHECK-LABEL: @test_sext ; CHECK: %se2 = sext i64 %iv2.inc to i128 -; CHECK-NEXT: --> {(1 + (sext i64 {(sext i32 (1 + %a) to i64),+,1}<%loop> to i128)),+,1}<%loop2> +; CHECK-NEXT: --> {(1 + (sext i64 {(sext i32 (1 + %a) to i64),+,1}<%loop> to i128)),+,1}<%loop2> entry: br label %loop @@ -116,7 +116,7 @@ define void @test_trunc(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) { ; CHECK-LABEL: @test_trunc ; CHECK: %trunc2 = trunc i64 %iv2.inc to i32 -; CHECK-NEXT: --> {(trunc i64 (1 + {7,+,1}<%loop>) to i32),+,1}<%loop2> +; CHECK-NEXT: --> {(trunc i64 (1 + {7,+,1}<%loop>) to i32),+,1}<%loop2> entry: br label %loop Index: llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll =================================================================== --- llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll +++ llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll @@ -12,7 +12,7 @@ ; CHECK-NEXT: %idx = getelementptr inbounds i32, i32* %a, i64 %iv ; CHECK-NEXT: --> {((4 * %i) + %a),+,4}<%loop> U: full-set S: full-set Exits: (60 + %a) LoopDispositions: { %loop: Computable } ; CHECK-NEXT: %iv.next = add nuw nsw i64 %iv, 1 -; CHECK-NEXT: --> {(1 + %i),+,1}<%loop> U: full-set S: full-set Exits: 16 LoopDispositions: { %loop: Computable } +; CHECK-NEXT: --> {(1 + %i),+,1}<%loop> U: [1,0) S: [-9223372036854775807,-9223372036854775808) Exits: 16 LoopDispositions: { %loop: Computable } ; CHECK-NEXT: Determining loop execution counts for: @test_guard_less_than_16 ; CHECK-NEXT: Loop %loop: backedge-taken count is (15 + (-1 * %i)) ; CHECK-NEXT: Loop %loop: max backedge-taken count is 15 @@ -44,7 +44,7 @@ ; CHECK-NEXT: %idx = getelementptr inbounds i32, i32* %a, i64 %iv ; CHECK-NEXT: --> {((4 * %i) + %a),+,4}<%loop> U: full-set S: full-set Exits: (60 + %a) LoopDispositions: { %loop: Computable } ; CHECK-NEXT: %iv.next = add nuw nsw i64 %iv, 1 -; CHECK-NEXT: --> {(1 + %i),+,1}<%loop> U: full-set S: full-set Exits: 16 LoopDispositions: { %loop: Computable } +; CHECK-NEXT: --> {(1 + %i),+,1}<%loop> U: [1,0) S: [-9223372036854775807,-9223372036854775808) Exits: 16 LoopDispositions: { %loop: Computable } ; CHECK-NEXT: Determining loop execution counts for: @test_guard_less_than_16_operands_swapped ; CHECK-NEXT: Loop %loop: backedge-taken count is (15 + (-1 * %i)) ; CHECK-NEXT: Loop %loop: max backedge-taken count is 15 @@ -76,7 +76,7 @@ ; CHECK-NEXT: %idx = getelementptr inbounds i32, i32* %a, i64 %iv ; CHECK-NEXT: --> {((4 * %i) + %a),+,4}<%loop> U: full-set S: full-set Exits: (60 + %a) LoopDispositions: { %loop: Computable } ; CHECK-NEXT: %iv.next = add nuw nsw i64 %iv, 1 -; CHECK-NEXT: --> {(1 + %i),+,1}<%loop> U: full-set S: full-set Exits: 16 LoopDispositions: { %loop: Computable } +; CHECK-NEXT: --> {(1 + %i),+,1}<%loop> U: [1,0) S: [-9223372036854775807,-9223372036854775808) Exits: 16 LoopDispositions: { %loop: Computable } ; CHECK-NEXT: Determining loop execution counts for: @test_guard_less_than_16_branches_flipped ; CHECK-NEXT: Loop %loop: backedge-taken count is (15 + (-1 * %i)) ; CHECK-NEXT: Loop %loop: max backedge-taken count is -1 @@ -108,7 +108,7 @@ ; CHECK-NEXT: %idx = getelementptr inbounds i32, i32* %a, i64 %iv ; CHECK-NEXT: --> {((4 * %i) + %a),+,4}<%loop> U: full-set S: full-set Exits: (60 + %a) LoopDispositions: { %loop: Computable } ; CHECK-NEXT: %iv.next = add nuw nsw i64 %iv, 1 -; CHECK-NEXT: --> {(1 + %i),+,1}<%loop> U: full-set S: full-set Exits: 16 LoopDispositions: { %loop: Computable } +; CHECK-NEXT: --> {(1 + %i),+,1}<%loop> U: [1,0) S: [-9223372036854775807,-9223372036854775808) Exits: 16 LoopDispositions: { %loop: Computable } ; CHECK-NEXT: Determining loop execution counts for: @test_guard_uge_16_branches_flipped ; CHECK-NEXT: Loop %loop: backedge-taken count is (15 + (-1 * %i)) ; CHECK-NEXT: Loop %loop: max backedge-taken count is 15 Index: llvm/test/Analysis/ScalarEvolution/trip-count-non-unit-stride.ll =================================================================== --- llvm/test/Analysis/ScalarEvolution/trip-count-non-unit-stride.ll +++ llvm/test/Analysis/ScalarEvolution/trip-count-non-unit-stride.ll @@ -171,7 +171,7 @@ ; CHECK-NEXT: %iv = phi i64 [ 0, %start ], [ %iv.inc2, %latch ] ; CHECK-NEXT: --> {0,+,-2}<%loop> U: [0,-1) S: [-9223372036854775808,1) Exits: <> LoopDispositions: { %loop: Computable } ; CHECK-NEXT: %iv.inc = add nsw i64 %iv, -1 -; CHECK-NEXT: --> {-1,+,-2}<%loop> U: full-set S: full-set Exits: <> LoopDispositions: { %loop: Computable } +; CHECK-NEXT: --> {-1,+,-2}<%loop> U: [-9223372036854775808,0) S: [-9223372036854775808,0) Exits: <> LoopDispositions: { %loop: Computable } ; CHECK-NEXT: %iv.inc2 = add nsw i64 %iv, -2 ; CHECK-NEXT: --> {-2,+,-2}<%loop> U: [0,-1) S: [-9223372036854775808,9223372036854775807) Exits: <> LoopDispositions: { %loop: Computable } ; CHECK-NEXT: Determining loop execution counts for: @test_postinc_sgt Index: llvm/test/Analysis/ScalarEvolution/trip-count12.ll =================================================================== --- llvm/test/Analysis/ScalarEvolution/trip-count12.ll +++ llvm/test/Analysis/ScalarEvolution/trip-count12.ll @@ -2,7 +2,7 @@ ; RUN: opt < %s -disable-output "-passes=print" 2>&1 | FileCheck %s ; CHECK: Determining loop execution counts for: @test -; CHECK: Loop %for.body: backedge-taken count is ((-2 + %len) /u 2) +; CHECK: Loop %for.body: backedge-taken count is ((-2 + %len) /u 2) ; CHECK: Loop %for.body: max backedge-taken count is 1073741823 define zeroext i16 @test(i16* nocapture %p, i32 %len) nounwind readonly { Index: llvm/test/Analysis/ScalarEvolution/trip-count9.ll =================================================================== --- llvm/test/Analysis/ScalarEvolution/trip-count9.ll +++ llvm/test/Analysis/ScalarEvolution/trip-count9.ll @@ -225,9 +225,9 @@ define void @nsw_startx(i4 %n, i4 %x) { ; CHECK-LABEL: 'nsw_startx' ; CHECK-NEXT: Determining loop execution counts for: @nsw_startx -; CHECK-NEXT: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax %n)) +; CHECK-NEXT: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax %n)) ; CHECK-NEXT: Loop %loop: max backedge-taken count is -1 -; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax %n)) +; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax %n)) ; CHECK-NEXT: Predicates: ; CHECK: Loop %loop: Trip multiple is 1 ; @@ -246,9 +246,9 @@ define void @nsw_startx_step2(i4 %n, i4 %x) { ; CHECK-LABEL: 'nsw_startx_step2' ; CHECK-NEXT: Determining loop execution counts for: @nsw_startx_step2 -; CHECK-NEXT: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax %n)) /u 2) +; CHECK-NEXT: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax %n)) /u 2) ; CHECK-NEXT: Loop %loop: max backedge-taken count is 7 -; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax %n)) /u 2) +; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax %n)) /u 2) ; CHECK-NEXT: Predicates: ; CHECK: Loop %loop: Trip multiple is 1 ; @@ -487,9 +487,9 @@ define void @even_nsw_startx(i4 %n, i4 %x) { ; CHECK-LABEL: 'even_nsw_startx' ; CHECK-NEXT: Determining loop execution counts for: @even_nsw_startx -; CHECK-NEXT: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax (2 * %n))) +; CHECK-NEXT: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax (2 * %n))) ; CHECK-NEXT: Loop %loop: max backedge-taken count is -2 -; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax (2 * %n))) +; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax (2 * %n))) ; CHECK-NEXT: Predicates: ; CHECK: Loop %loop: Trip multiple is 1 ; @@ -509,9 +509,9 @@ define void @even_nsw_startx_step2(i4 %n, i4 %x) { ; CHECK-LABEL: 'even_nsw_startx_step2' ; CHECK-NEXT: Determining loop execution counts for: @even_nsw_startx_step2 -; CHECK-NEXT: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax (2 * %n))) /u 2) +; CHECK-NEXT: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax (2 * %n))) /u 2) ; CHECK-NEXT: Loop %loop: max backedge-taken count is 7 -; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax (2 * %n))) /u 2) +; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax (2 * %n))) /u 2) ; CHECK-NEXT: Predicates: ; CHECK: Loop %loop: Trip multiple is 1 ; Index: llvm/test/Transforms/AggressiveInstCombine/funnel.ll =================================================================== --- llvm/test/Transforms/AggressiveInstCombine/funnel.ll +++ llvm/test/Transforms/AggressiveInstCombine/funnel.ll @@ -385,9 +385,8 @@ ; CHECK: fshbb: ; CHECK-NEXT: br label [[END]] ; CHECK: end: -; CHECK-NEXT: [[TMP0:%.*]] = freeze i32 [[C]] -; CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.fshr.i32(i32 [[TMP0]], i32 [[B:%.*]], i32 [[C]]) -; CHECK-NEXT: ret i32 [[TMP1]] +; CHECK-NEXT: [[TMP0:%.*]] = call i32 @llvm.fshr.i32(i32 [[C]], i32 [[B:%.*]], i32 [[C]]) +; CHECK-NEXT: ret i32 [[TMP0]] ; entry: %cmp = icmp eq i32 %c, 0 Index: llvm/test/Transforms/AggressiveInstCombine/rotate.ll =================================================================== --- llvm/test/Transforms/AggressiveInstCombine/rotate.ll +++ llvm/test/Transforms/AggressiveInstCombine/rotate.ll @@ -380,9 +380,8 @@ ; CHECK: rotbb: ; CHECK-NEXT: br label [[END]] ; CHECK: end: -; CHECK-NEXT: [[TMP0:%.*]] = freeze i32 [[B]] -; CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.fshr.i32(i32 [[TMP0]], i32 [[A:%.*]], i32 [[B]]) -; CHECK-NEXT: ret i32 [[TMP1]] +; CHECK-NEXT: [[TMP0:%.*]] = call i32 @llvm.fshr.i32(i32 [[B]], i32 [[A:%.*]], i32 [[B]]) +; CHECK-NEXT: ret i32 [[TMP0]] ; entry: %cmp = icmp eq i32 %b, 0 Index: llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow.ll =================================================================== --- llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow.ll +++ llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow.ll @@ -8,7 +8,7 @@ define internal i32 @callee(i1 %C, i32* %P) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind readonly willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@callee -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0:[0-9]+]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: T: @@ -19,7 +19,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@callee -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0:[0-9]+]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: T: @@ -49,9 +49,9 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree readonly [[P:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: entry: -; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @callee(i1 [[C]], i32* nocapture nofree readonly [[P]]) #[[ATTR1:[0-9]+]] +; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @callee(i1 noundef [[C]], i32* nocapture nofree readonly [[P]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: ret i32 [[X]] ; entry: Index: llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll =================================================================== --- llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll +++ llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll @@ -8,7 +8,7 @@ define internal i32* @incdec(i1 %C, i32* %V) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@incdec -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]], i32* noalias nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: [[X:%.*]] = load i32, i32* [[V]], align 4 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: T: @@ -22,7 +22,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@incdec -; IS__CGSCC____-SAME: (i1 [[C:%.*]], i32* noalias nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]], i32* noalias nofree noundef nonnull returned align 4 dereferenceable(4) "no-capture-maybe-returned" [[V:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: [[X:%.*]] = load i32, i32* [[V]], align 4 ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: T: @@ -95,9 +95,9 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] personality i32 (...)* @__gxx_personality_v0 { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] personality i32 (...)* @__gxx_personality_v0 { ; IS__CGSCC____-NEXT: [[Q:%.*]] = alloca i32, align 4 -; IS__CGSCC____-NEXT: [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) #[[ATTR2:[0-9]+]] +; IS__CGSCC____-NEXT: [[W:%.*]] = call align 4 i32* @incdec(i1 noundef [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) #[[ATTR2:[0-9]+]] ; IS__CGSCC____-NEXT: [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR3:[0-9]+]] ; IS__CGSCC____-NEXT: [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0 ; IS__CGSCC____-NEXT: [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR4:[0-9]+]] Index: llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll =================================================================== --- llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll +++ llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll @@ -19,8 +19,8 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@invokecaller -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 { -; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @foo(i1 [[C]]) #[[ATTR1:[0-9]+]] +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 { +; IS__CGSCC____-NEXT: [[X:%.*]] = call i32 @foo(i1 noundef [[C]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: br label [[OK:%.*]] ; IS__CGSCC____: OK: ; IS__CGSCC____-NEXT: ret i1 true @@ -40,7 +40,7 @@ define internal i32 @foo(i1 %C) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: T: ; IS__TUNIT____-NEXT: ret i32 undef @@ -49,7 +49,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: T: ; IS__CGSCC____-NEXT: ret i32 undef @@ -73,7 +73,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: ret i1 true ; %X = call i32 @foo( i1 %C ) ; [#uses=1] Index: llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll =================================================================== --- llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll +++ llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll @@ -11,7 +11,7 @@ define internal %0 @foo(i1 %Q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo -; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) #[[ATTR0:[0-9]+]] { +; IS__TUNIT____-SAME: (i1 noundef [[Q:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-NEXT: br i1 [[Q]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: T: ; IS__TUNIT____-NEXT: [[MRV:%.*]] = insertvalue [[TMP0:%.*]] undef, i32 21, 0 @@ -24,7 +24,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo -; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) #[[ATTR0:[0-9]+]] { +; IS__CGSCC____-SAME: (i1 noundef [[Q:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: br i1 [[Q]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: T: ; IS__CGSCC____-NEXT: [[MRV:%.*]] = insertvalue [[TMP0:%.*]] undef, i32 21, 0 @@ -51,7 +51,7 @@ define internal %0 @bar(i1 %Q) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@bar -; IS__TUNIT____-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i1 noundef [[Q:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[A:%.*]] = insertvalue [[TMP0:%.*]] undef, i32 21, 0 ; IS__TUNIT____-NEXT: br i1 [[Q]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: T: @@ -63,7 +63,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@bar -; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[Q:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = insertvalue [[TMP0:%.*]] undef, i32 21, 0 ; IS__CGSCC____-NEXT: br i1 [[Q]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: T: @@ -94,8 +94,8 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller -; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] { -; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR1:[0-9]+]] +; IS__CGSCC____-SAME: (i1 noundef [[Q:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 noundef [[Q]]) #[[ATTR1:[0-9]+]] ; IS__CGSCC____-NEXT: ret [[TMP0]] [[X]] ; %X = call %0 @foo(i1 %Q) @@ -127,11 +127,11 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2 -; IS__CGSCC____-SAME: (i1 [[Q:%.*]]) #[[ATTR0]] { -; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 [[Q]]) #[[ATTR1]] +; IS__CGSCC____-SAME: (i1 noundef [[Q:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-NEXT: [[X:%.*]] = call [[TMP0:%.*]] @foo(i1 noundef [[Q]]) #[[ATTR1]] ; IS__CGSCC____-NEXT: [[A:%.*]] = extractvalue [[TMP0]] [[X]], 0 ; IS__CGSCC____-NEXT: [[B:%.*]] = extractvalue [[TMP0]] [[X]], 1 -; IS__CGSCC____-NEXT: [[Y:%.*]] = call [[TMP0]] @bar(i1 [[Q]]) #[[ATTR1]] +; IS__CGSCC____-NEXT: [[Y:%.*]] = call [[TMP0]] @bar(i1 noundef [[Q]]) #[[ATTR1]] ; IS__CGSCC____-NEXT: [[C:%.*]] = extractvalue [[TMP0]] [[Y]], 0 ; IS__CGSCC____-NEXT: [[D:%.*]] = extractvalue [[TMP0]] [[Y]], 1 ; IS__CGSCC____-NEXT: [[M:%.*]] = add i32 [[A]], [[C]] Index: llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll =================================================================== --- llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll +++ llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll @@ -7,7 +7,7 @@ define internal i32 @testf(i1 %c) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@testf -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0:[0-9]+]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[C]], label [[IF_COND:%.*]], label [[IF_END:%.*]] ; IS__CGSCC____: if.cond: Index: llvm/test/Transforms/Attributor/align.ll =================================================================== --- llvm/test/Transforms/Attributor/align.ll +++ llvm/test/Transforms/Attributor/align.ll @@ -915,7 +915,7 @@ define void @test13(i1 %c, i32* align 32 %dst) #0 { ; IS__TUNIT____: Function Attrs: argmemonly nofree noinline nosync nounwind uwtable willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR7:[0-9]+]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR7:[0-9]+]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -928,7 +928,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC_OPM: truebb: ; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] @@ -941,7 +941,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind uwtable willreturn writeonly ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__CGSCC_NPM-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC_NPM: truebb: ; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] @@ -966,7 +966,7 @@ define void @test13-1(i1 %c, i32* align 32 %dst) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -979,7 +979,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13-1 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR10:[0-9]+]] { +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR10:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC_OPM: truebb: ; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] @@ -992,7 +992,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13-1 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC_NPM-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC_NPM: truebb: ; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] @@ -1017,7 +1017,7 @@ define void @test13-2(i1 %c, i32* align 32 %dst) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -1030,7 +1030,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13-2 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR10]] { +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR10]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC_OPM: truebb: ; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] @@ -1043,7 +1043,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13-2 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9]] { +; IS__CGSCC_NPM-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC_NPM: truebb: ; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] @@ -1068,7 +1068,7 @@ define void @test13-3(i1 %c, i32* align 32 %dst) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind willreturn writeonly ; IS__TUNIT____-LABEL: define {{[^@]+}}@test13-3 -; IS__TUNIT____-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR8]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__TUNIT____: truebb: ; IS__TUNIT____-NEXT: br label [[END:%.*]] @@ -1081,7 +1081,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13-3 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR10]] { +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR10]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC_OPM: truebb: ; IS__CGSCC_OPM-NEXT: br label [[END:%.*]] @@ -1094,7 +1094,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test13-3 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9]] { +; IS__CGSCC_NPM-SAME: (i1 noundef [[C:%.*]], i32* nocapture nofree writeonly align 32 [[DST:%.*]]) #[[ATTR9]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[TRUEBB:%.*]], label [[FALSEBB:%.*]] ; IS__CGSCC_NPM: truebb: ; IS__CGSCC_NPM-NEXT: br label [[END:%.*]] Index: llvm/test/Transforms/Attributor/dereferenceable-1.ll =================================================================== --- llvm/test/Transforms/Attributor/dereferenceable-1.ll +++ llvm/test/Transforms/Attributor/dereferenceable-1.ll @@ -247,7 +247,7 @@ define void @f7_1(i32* %ptr, i1 %c) { ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@f7_1 -; CHECK-SAME: (i32* noundef nonnull align 4 dereferenceable(4) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR1]] { +; CHECK-SAME: (i32* noundef nonnull align 4 dereferenceable(4) [[PTR:%.*]], i1 noundef [[C:%.*]]) #[[ATTR1]] { ; CHECK-NEXT: [[A:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) #[[ATTR1]] ; CHECK-NEXT: [[B:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) #[[ATTR1]] ; CHECK-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] @@ -277,7 +277,7 @@ define void @f7_2(i1 %c) { ; CHECK: Function Attrs: nounwind willreturn ; CHECK-LABEL: define {{[^@]+}}@f7_2 -; CHECK-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; CHECK-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] { ; CHECK-NEXT: [[PTR:%.*]] = tail call nonnull align 4 dereferenceable(4) i32* @unkown_ptr() #[[ATTR1]] ; CHECK-NEXT: [[A:%.*]] = tail call i32 @unkown_f(i32* noundef nonnull align 4 dereferenceable(4) [[PTR]]) #[[ATTR1]] ; CHECK-NEXT: [[ARG_A_0:%.*]] = load i32, i32* [[PTR]], align 4 Index: llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll =================================================================== --- llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll +++ llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll @@ -223,7 +223,7 @@ define void @not_entry_not_guaranteed_to_execute(i8* %ptr, i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute -; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 noundef [[COND:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__TUNIT____: loads: @@ -233,7 +233,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute -; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 noundef [[COND:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__CGSCC____: loads: @@ -260,7 +260,7 @@ define void @partial_in_entry(i16* %ptr, i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@partial_in_entry -; IS__TUNIT____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { +; IS__TUNIT____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 noundef [[COND:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__TUNIT____: loads: @@ -270,7 +270,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@partial_in_entry -; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { +; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 noundef [[COND:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__CGSCC____: loads: Index: llvm/test/Transforms/Attributor/dereferenceable-2.ll =================================================================== --- llvm/test/Transforms/Attributor/dereferenceable-2.ll +++ llvm/test/Transforms/Attributor/dereferenceable-2.ll @@ -223,7 +223,7 @@ define void @not_entry_not_guaranteed_to_execute(i8* %ptr, i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute -; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 noundef [[COND:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__TUNIT____: loads: @@ -233,7 +233,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_entry_not_guaranteed_to_execute -; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree readnone [[PTR:%.*]], i1 noundef [[COND:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__CGSCC____: loads: @@ -260,7 +260,7 @@ define void @partial_in_entry(i16* %ptr, i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@partial_in_entry -; IS__TUNIT____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { +; IS__TUNIT____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 noundef [[COND:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__TUNIT____: loads: @@ -270,7 +270,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@partial_in_entry -; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 [[COND:%.*]]) #[[ATTR2]] { +; IS__CGSCC____-SAME: (i16* nocapture nofree nonnull readnone align 2 dereferenceable(4) [[PTR:%.*]], i1 noundef [[COND:%.*]]) #[[ATTR2]] { ; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[LOADS:%.*]], label [[EXIT:%.*]] ; IS__CGSCC____: loads: Index: llvm/test/Transforms/Attributor/memory_locations.ll =================================================================== --- llvm/test/Transforms/Attributor/memory_locations.ll +++ llvm/test/Transforms/Attributor/memory_locations.ll @@ -535,7 +535,7 @@ define i8 @recursive_not_readnone(i8* %ptr, i1 %c) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone -; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 noundef [[C:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: @@ -548,7 +548,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone -; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[PTR:%.*]], i1 noundef [[C:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: @@ -573,7 +573,7 @@ define internal i8 @recursive_not_readnone_internal(i8* %ptr, i1 %c) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal -; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] { +; IS__TUNIT____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 noundef [[C:%.*]]) #[[ATTR8]] { ; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: @@ -586,7 +586,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal -; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] { +; IS__CGSCC____-SAME: (i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[PTR:%.*]], i1 noundef [[C:%.*]]) #[[ATTR8]] { ; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: @@ -618,9 +618,9 @@ ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR9:[0-9]+]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR9:[0-9]+]] { ; IS__CGSCC____-NEXT: [[A:%.*]] = alloca i8, align 1 -; IS__CGSCC____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) #[[ATTR12:[0-9]+]] +; IS__CGSCC____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 noundef [[C]]) #[[ATTR12:[0-9]+]] ; IS__CGSCC____-NEXT: ret i8 [[R]] ; %a = alloca i8 @@ -631,7 +631,7 @@ define internal i8 @recursive_not_readnone_internal2(i8* %ptr, i1 %c) { ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind ; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal2 -; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] { +; IS__TUNIT____-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 noundef [[C:%.*]]) #[[ATTR8]] { ; IS__TUNIT____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: @@ -644,7 +644,7 @@ ; ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind ; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_not_readnone_internal2 -; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 [[C:%.*]]) #[[ATTR8]] { +; IS__CGSCC____-SAME: (i8* nocapture nofree nonnull writeonly [[PTR:%.*]], i1 noundef [[C:%.*]]) #[[ATTR8]] { ; IS__CGSCC____-NEXT: [[ALLOC:%.*]] = alloca i8, align 1 ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: @@ -675,8 +675,8 @@ ; ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone ; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR9]] { -; IS__CGSCC____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR12]] +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR9]] { +; IS__CGSCC____-NEXT: [[R:%.*]] = call i8 @recursive_not_readnone_internal2(i8* undef, i1 noundef [[C]]) #[[ATTR12]] ; IS__CGSCC____-NEXT: ret i8 [[R]] ; %r = call i8 @recursive_not_readnone_internal2(i8* undef, i1 %c) Index: llvm/test/Transforms/Attributor/nocapture-1.ll =================================================================== --- llvm/test/Transforms/Attributor/nocapture-1.ll +++ llvm/test/Transforms/Attributor/nocapture-1.ll @@ -400,27 +400,16 @@ } define i8* @test1_2(i8* %x1_2, i8* %y1_2, i1 %c) { -; IS________OPM: Function Attrs: nofree nosync nounwind writeonly -; IS________OPM-LABEL: define {{[^@]+}}@test1_2 -; IS________OPM-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { -; IS________OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; IS________OPM: t: -; IS________OPM-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 [[C]]) #[[ATTR7]] -; IS________OPM-NEXT: store i32* null, i32** @g, align 8 -; IS________OPM-NEXT: br label [[F]] -; IS________OPM: f: -; IS________OPM-NEXT: ret i8* [[Y1_2]] -; -; IS________NPM: Function Attrs: nofree nosync nounwind writeonly -; IS________NPM-LABEL: define {{[^@]+}}@test1_2 -; IS________NPM-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { -; IS________NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; IS________NPM: t: -; IS________NPM-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 noundef [[C]]) #[[ATTR7]] -; IS________NPM-NEXT: store i32* null, i32** @g, align 8 -; IS________NPM-NEXT: br label [[F]] -; IS________NPM: f: -; IS________NPM-NEXT: ret i8* [[Y1_2]] +; CHECK: Function Attrs: nofree nosync nounwind writeonly +; CHECK-LABEL: define {{[^@]+}}@test1_2 +; CHECK-SAME: (i8* nocapture nofree readnone [[X1_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y1_2:%.*]], i1 noundef [[C:%.*]]) #[[ATTR7]] { +; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] +; CHECK: t: +; CHECK-NEXT: call void @test1_1(i8* noalias nocapture nofree readnone undef, i8* noalias nocapture nofree readnone [[Y1_2]], i1 noundef [[C]]) #[[ATTR7]] +; CHECK-NEXT: store i32* null, i32** @g, align 8 +; CHECK-NEXT: br label [[F]] +; CHECK: f: +; CHECK-NEXT: ret i8* [[Y1_2]] ; br i1 %c, label %t, label %f t: @@ -477,27 +466,16 @@ } define i8* @test4_2(i8* %x4_2, i8* %y4_2, i8* %z4_2, i1 %c) { -; IS________OPM: Function Attrs: nofree nosync nounwind writeonly -; IS________OPM-LABEL: define {{[^@]+}}@test4_2 -; IS________OPM-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { -; IS________OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; IS________OPM: t: -; IS________OPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 536870912 null, i1 [[C]]) #[[ATTR7]] -; IS________OPM-NEXT: store i32* null, i32** @g, align 8 -; IS________OPM-NEXT: br label [[F]] -; IS________OPM: f: -; IS________OPM-NEXT: ret i8* [[Y4_2]] -; -; IS________NPM: Function Attrs: nofree nosync nounwind writeonly -; IS________NPM-LABEL: define {{[^@]+}}@test4_2 -; IS________NPM-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { -; IS________NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] -; IS________NPM: t: -; IS________NPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 536870912 null, i1 noundef [[C]]) #[[ATTR7]] -; IS________NPM-NEXT: store i32* null, i32** @g, align 8 -; IS________NPM-NEXT: br label [[F]] -; IS________NPM: f: -; IS________NPM-NEXT: ret i8* [[Y4_2]] +; CHECK: Function Attrs: nofree nosync nounwind writeonly +; CHECK-LABEL: define {{[^@]+}}@test4_2 +; CHECK-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 noundef [[C:%.*]]) #[[ATTR7]] { +; CHECK-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] +; CHECK: t: +; CHECK-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 536870912 null, i1 noundef [[C]]) #[[ATTR7]] +; CHECK-NEXT: store i32* null, i32** @g, align 8 +; CHECK-NEXT: br label [[F]] +; CHECK: f: +; CHECK-NEXT: ret i8* [[Y4_2]] ; br i1 %c, label %t, label %f t: Index: llvm/test/Transforms/Attributor/nonnull.ll =================================================================== --- llvm/test/Transforms/Attributor/nonnull.ll +++ llvm/test/Transforms/Attributor/nonnull.ll @@ -39,7 +39,7 @@ ; ATTRIBUTOR: define nonnull i8* @test2A(i1 %c, i8* nofree nonnull readnone returned %ret) ; NOT_CGSCC_OPM: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test2A -; NOT_CGSCC_OPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0:[0-9]+]] { +; NOT_CGSCC_OPM-SAME: (i1 noundef [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0:[0-9]+]] { ; NOT_CGSCC_OPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] ; NOT_CGSCC_OPM: A: ; NOT_CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR12:[0-9]+]] [ "nonnull"(i8* [[RET]]) ] @@ -50,7 +50,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test2A -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0:[0-9]+]] { +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]], i8* nofree nonnull readnone returned "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] ; IS__CGSCC_OPM: A: ; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR13:[0-9]+]] [ "nonnull"(i8* [[RET]]) ] @@ -72,7 +72,7 @@ ; ATTRIBUTOR: define nonnull dereferenceable(4) i8* @test2B(i1 %c, i8* nofree nonnull readnone returned dereferenceable(4) %ret) ; NOT_CGSCC_OPM: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn ; NOT_CGSCC_OPM-LABEL: define {{[^@]+}}@test2B -; NOT_CGSCC_OPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0]] { +; NOT_CGSCC_OPM-SAME: (i1 noundef [[C:%.*]], i8* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0]] { ; NOT_CGSCC_OPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] ; NOT_CGSCC_OPM: A: ; NOT_CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR12]] [ "dereferenceable"(i8* [[RET]], i32 4) ] @@ -83,7 +83,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: inaccessiblememonly nofree nosync nounwind willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test2B -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i8* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]], i8* nofree nonnull readnone returned dereferenceable(4) "no-capture-maybe-returned" [[RET:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]] ; IS__CGSCC_OPM: A: ; IS__CGSCC_OPM-NEXT: call void @llvm.assume(i1 noundef true) #[[ATTR13]] [ "dereferenceable"(i8* [[RET]], i32 4) ] @@ -104,23 +104,14 @@ ; Given an SCC where one of the functions can not be marked nonnull, ; can we still mark the other one which is trivially nonnull define i8* @scc_binder(i1 %c) { -; IS________OPM-LABEL: define {{[^@]+}}@scc_binder -; IS________OPM-SAME: (i1 [[C:%.*]]) { -; IS________OPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] -; IS________OPM: rec: -; IS________OPM-NEXT: [[TMP1:%.*]] = call i8* @test3(i1 [[C]]) -; IS________OPM-NEXT: br label [[END]] -; IS________OPM: end: -; IS________OPM-NEXT: ret i8* null -; -; IS________NPM-LABEL: define {{[^@]+}}@scc_binder -; IS________NPM-SAME: (i1 [[C:%.*]]) { -; IS________NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] -; IS________NPM: rec: -; IS________NPM-NEXT: [[TMP1:%.*]] = call i8* @test3(i1 noundef [[C]]) -; IS________NPM-NEXT: br label [[END]] -; IS________NPM: end: -; IS________NPM-NEXT: ret i8* null +; CHECK-LABEL: define {{[^@]+}}@scc_binder +; CHECK-SAME: (i1 noundef [[C:%.*]]) { +; CHECK-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] +; CHECK: rec: +; CHECK-NEXT: [[TMP1:%.*]] = call i8* @test3(i1 noundef [[C]]) +; CHECK-NEXT: br label [[END]] +; CHECK: end: +; CHECK-NEXT: ret i8* null ; br i1 %c, label %rec, label %end rec: @@ -172,7 +163,7 @@ define i8* @test5_helper(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test5_helper -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__TUNIT____: rec: ; IS__TUNIT____-NEXT: br label [[END]] @@ -181,7 +172,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test5_helper -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__CGSCC_OPM: rec: ; IS__CGSCC_OPM-NEXT: br label [[END]] @@ -190,7 +181,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test5_helper -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__CGSCC_NPM: rec: ; IS__CGSCC_NPM-NEXT: br label [[END]] @@ -887,7 +878,7 @@ define void @parent5(i8* %a, i1 %a_is_notnull) { ; CHECK-LABEL: define {{[^@]+}}@parent5 -; CHECK-SAME: (i8* [[A:%.*]], i1 [[A_IS_NOTNULL:%.*]]) { +; CHECK-SAME: (i8* [[A:%.*]], i1 noundef [[A_IS_NOTNULL:%.*]]) { ; CHECK-NEXT: br i1 [[A_IS_NOTNULL]], label [[T:%.*]], label [[F:%.*]] ; CHECK: t: ; CHECK-NEXT: call void @use1nonnull(i8* nonnull [[A]]) Index: llvm/test/Transforms/Attributor/nounwind.ll =================================================================== --- llvm/test/Transforms/Attributor/nounwind.ll +++ llvm/test/Transforms/Attributor/nounwind.ll @@ -74,7 +74,7 @@ define i32 @maybe_throw(i1 zeroext %0) { ; CHECK-LABEL: define {{[^@]+}}@maybe_throw -; CHECK-SAME: (i1 zeroext [[TMP0:%.*]]) { +; CHECK-SAME: (i1 noundef zeroext [[TMP0:%.*]]) { ; CHECK-NEXT: br i1 [[TMP0]], label [[TMP2:%.*]], label [[TMP3:%.*]] ; CHECK: 2: ; CHECK-NEXT: tail call void @__cxa_rethrow() Index: llvm/test/Transforms/Attributor/potential.ll =================================================================== --- llvm/test/Transforms/Attributor/potential.ll +++ llvm/test/Transforms/Attributor/potential.ll @@ -501,7 +501,7 @@ define internal i32 @may_return_undef(i32 %c) { ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@may_return_undef -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ ; IS__CGSCC____-NEXT: i32 1, label [[A:%.*]] ; IS__CGSCC____-NEXT: i32 -1, label [[B:%.*]] @@ -542,7 +542,7 @@ define i32 @optimize_undef_1(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@optimize_undef_1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: ret i32 0 @@ -551,7 +551,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@optimize_undef_1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i32 0 @@ -569,7 +569,7 @@ define i32 @optimize_undef_2(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@optimize_undef_2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: ret i32 0 @@ -578,7 +578,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@optimize_undef_2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i32 0 @@ -596,7 +596,7 @@ define i32 @optimize_undef_3(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@optimize_undef_3 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: ret i32 0 @@ -605,7 +605,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@optimize_undef_3 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: ret i32 0 @@ -644,20 +644,20 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test11 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR2]], !range [[RNG0]] -; IS__CGSCC_OPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR2]], !range [[RNG3:![0-9]+]] -; IS__CGSCC_OPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR2]], !range [[RNG0]] +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 noundef [[C]]) #[[ATTR2]], !range [[RNG0]] +; IS__CGSCC_OPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 noundef [[C]]) #[[ATTR2]], !range [[RNG3:![0-9]+]] +; IS__CGSCC_OPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 noundef [[C]]) #[[ATTR2]], !range [[RNG0]] ; IS__CGSCC_OPM-NEXT: [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]] ; IS__CGSCC_OPM-NEXT: [[ACC2:%.*]] = add i32 [[ACC1]], [[ZERO3]] ; IS__CGSCC_OPM-NEXT: ret i32 [[ACC2]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test11 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { -; IS__CGSCC_NPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR1]], !range [[RNG0]] -; IS__CGSCC_NPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR1]], !range [[RNG3:![0-9]+]] -; IS__CGSCC_NPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR1]], !range [[RNG0]] +; IS__CGSCC_NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC_NPM-NEXT: [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 noundef [[C]]) #[[ATTR1]], !range [[RNG0]] +; IS__CGSCC_NPM-NEXT: [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 noundef [[C]]) #[[ATTR1]], !range [[RNG3:![0-9]+]] +; IS__CGSCC_NPM-NEXT: [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 noundef [[C]]) #[[ATTR1]], !range [[RNG0]] ; IS__CGSCC_NPM-NEXT: [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]] ; IS__CGSCC_NPM-NEXT: [[ACC2:%.*]] = add i32 [[ACC1]], [[ZERO3]] ; IS__CGSCC_NPM-NEXT: ret i32 [[ACC2]] @@ -673,7 +673,7 @@ define i32 @optimize_poison_1(i1 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@optimize_poison_1 -; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT_OPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT_OPM: t: ; IS__TUNIT_OPM-NEXT: ret i32 0 @@ -682,7 +682,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@optimize_poison_1 -; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT_NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT_NPM: t: ; IS__TUNIT_NPM-NEXT: ret i32 0 @@ -691,7 +691,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@optimize_poison_1 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_OPM: t: ; IS__CGSCC_OPM-NEXT: ret i32 0 @@ -700,7 +700,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@optimize_poison_1 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC_NPM: t: ; IS__CGSCC_NPM-NEXT: ret i32 0 @@ -730,13 +730,13 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test12 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { -; IS__CGSCC_OPM-NEXT: [[ZERO:%.*]] = call i32 @optimize_poison_1(i1 [[C]]) #[[ATTR2]], !range [[RNG3]] +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC_OPM-NEXT: [[ZERO:%.*]] = call i32 @optimize_poison_1(i1 noundef [[C]]) #[[ATTR2]], !range [[RNG3]] ; IS__CGSCC_OPM-NEXT: ret i32 [[ZERO]] ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test12 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC_NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC_NPM-NEXT: ret i32 0 ; %zero = call i32 @optimize_poison_1(i1 %c) Index: llvm/test/Transforms/Attributor/range.ll =================================================================== --- llvm/test/Transforms/Attributor/range.ll +++ llvm/test/Transforms/Attributor/range.ll @@ -2000,7 +2000,7 @@ define internal i32 @less_than_100_1(i32 %c) { ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@less_than_100_1 -; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ ; IS__CGSCC_OPM-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__CGSCC_OPM-NEXT: i32 1, label [[ONONE:%.*]] @@ -2029,7 +2029,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@less_than_100_1 -; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ ; IS__CGSCC_NPM-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__CGSCC_NPM-NEXT: i32 1, label [[ONONE:%.*]] @@ -2109,12 +2109,12 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@propagate_range1 -; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: ret i1 true ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@propagate_range1 -; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: ret i1 true ; %csret = call i32 @less_than_100_1(i32 %c) @@ -2125,7 +2125,7 @@ define internal i32 @less_than_100_2(i32 %c) { ; IS__TUNIT_OPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@less_than_100_2 -; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { +; IS__TUNIT_OPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR2]] { ; IS__TUNIT_OPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ ; IS__TUNIT_OPM-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__TUNIT_OPM-NEXT: i32 1, label [[ONONE:%.*]] @@ -2154,7 +2154,7 @@ ; ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@less_than_100_2 -; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] { ; IS__TUNIT_NPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ ; IS__TUNIT_NPM-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__TUNIT_NPM-NEXT: i32 1, label [[ONONE:%.*]] @@ -2183,7 +2183,7 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@less_than_100_2 -; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ ; IS__CGSCC_OPM-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__CGSCC_OPM-NEXT: i32 1, label [[ONONE:%.*]] @@ -2212,7 +2212,7 @@ ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@less_than_100_2 -; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: switch i32 [[C]], label [[OTHERWISE:%.*]] [ ; IS__CGSCC_NPM-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__CGSCC_NPM-NEXT: i32 1, label [[ONONE:%.*]] @@ -2315,12 +2315,12 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@propagate_range2 -; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR2]] { +; IS__CGSCC_OPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR2]] { ; IS__CGSCC_OPM-NEXT: ret i1 true ; ; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@propagate_range2 -; IS__CGSCC_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC_NPM-NEXT: ret i1 true ; %csret1 = call i32 @less_than_100_2(i32 0) Index: llvm/test/Transforms/Attributor/returned.ll =================================================================== --- llvm/test/Transforms/Attributor/returned.ll +++ llvm/test/Transforms/Attributor/returned.ll @@ -1410,7 +1410,7 @@ define i32 @deadblockphi3(i32 %A, i1 %c) #0 { ; CHECK: Function Attrs: noinline nounwind uwtable ; CHECK-LABEL: define {{[^@]+}}@deadblockphi3 -; CHECK-SAME: (i32 returned [[A:%.*]], i1 [[C:%.*]]) #[[ATTR3]] { +; CHECK-SAME: (i32 returned [[A:%.*]], i1 noundef [[C:%.*]]) #[[ATTR3]] { ; CHECK-NEXT: entry: ; CHECK-NEXT: br i1 [[C]], label [[R:%.*]], label [[UNREACHABLECALL:%.*]] ; CHECK: unreachablecall: Index: llvm/test/Transforms/Attributor/undefined_behavior.ll =================================================================== --- llvm/test/Transforms/Attributor/undefined_behavior.ll +++ llvm/test/Transforms/Attributor/undefined_behavior.ll @@ -47,7 +47,7 @@ define void @load_single_bb_unreachable(i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@load_single_bb_unreachable -; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i1 noundef [[COND:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -56,7 +56,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@load_single_bb_unreachable -; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[COND:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -133,7 +133,7 @@ define void @store_single_bb_unreachable(i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@store_single_bb_unreachable -; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i1 noundef [[COND:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -142,7 +142,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@store_single_bb_unreachable -; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[COND:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -213,7 +213,7 @@ define void @atomicrmw_single_bb_unreachable(i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomicrmw_single_bb_unreachable -; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] { +; IS__TUNIT____-SAME: (i1 noundef [[COND:%.*]]) #[[ATTR3]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -222,7 +222,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomicrmw_single_bb_unreachable -; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] { +; IS__CGSCC____-SAME: (i1 noundef [[COND:%.*]]) #[[ATTR3]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -293,7 +293,7 @@ define void @atomiccmpxchg_single_bb_unreachable(i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@atomiccmpxchg_single_bb_unreachable -; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] { +; IS__TUNIT____-SAME: (i1 noundef [[COND:%.*]]) #[[ATTR3]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__TUNIT____: t: ; IS__TUNIT____-NEXT: unreachable @@ -302,7 +302,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@atomiccmpxchg_single_bb_unreachable -; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR3]] { +; IS__CGSCC____-SAME: (i1 noundef [[COND:%.*]]) #[[ATTR3]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T:%.*]], label [[E:%.*]] ; IS__CGSCC____: t: ; IS__CGSCC____-NEXT: unreachable @@ -389,7 +389,7 @@ define void @cond_br_on_undef2(i1 %cond) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@cond_br_on_undef2 -; IS__TUNIT____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i1 noundef [[COND:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: br i1 [[COND]], label [[T1:%.*]], label [[E1:%.*]] ; IS__TUNIT____: t1: ; IS__TUNIT____-NEXT: unreachable @@ -402,7 +402,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@cond_br_on_undef2 -; IS__CGSCC____-SAME: (i1 [[COND:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[COND:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: br i1 [[COND]], label [[T1:%.*]], label [[E1:%.*]] ; IS__CGSCC____: t1: ; IS__CGSCC____-NEXT: unreachable @@ -814,7 +814,7 @@ define void @arg_nonnull_violation3_1(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: @@ -828,7 +828,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = alloca i32, align 4 ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: @@ -861,7 +861,7 @@ define void @arg_nonnull_violation3_2(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: [[PTR:%.*]] = alloca i32, align 4 ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____: t: @@ -875,7 +875,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@arg_nonnull_violation3_2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: [[PTR:%.*]] = alloca i32, align 4 ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____: t: @@ -910,7 +910,7 @@ define nonnull i32* @returned_nonnnull(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_nonnnull -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__TUNIT____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__TUNIT____-NEXT: i32 1, label [[ONONE:%.*]] @@ -925,7 +925,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_nonnnull -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__CGSCC____-NEXT: i32 1, label [[ONONE:%.*]] @@ -952,7 +952,7 @@ define noundef i32* @returned_noundef(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_noundef -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__TUNIT____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__TUNIT____-NEXT: i32 1, label [[ONONE:%.*]] @@ -967,7 +967,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_noundef -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__CGSCC____-NEXT: i32 1, label [[ONONE:%.*]] @@ -994,7 +994,7 @@ define nonnull noundef i32* @returned_nonnnull_noundef(i32 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@returned_nonnnull_noundef -; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { +; IS__TUNIT____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__TUNIT____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__TUNIT____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__TUNIT____-NEXT: i32 1, label [[ONONE:%.*]] @@ -1009,7 +1009,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@returned_nonnnull_noundef -; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] { +; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] { ; IS__CGSCC____-NEXT: switch i32 [[C]], label [[ONDEFAULT:%.*]] [ ; IS__CGSCC____-NEXT: i32 0, label [[ONZERO:%.*]] ; IS__CGSCC____-NEXT: i32 1, label [[ONONE:%.*]] Index: llvm/test/Transforms/Attributor/value-simplify.ll =================================================================== --- llvm/test/Transforms/Attributor/value-simplify.ll +++ llvm/test/Transforms/Attributor/value-simplify.ll @@ -63,7 +63,7 @@ define i32 @test2_1(i1 %c) { ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_1 -; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__TUNIT____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; IS__TUNIT____: if.true: ; IS__TUNIT____-NEXT: [[RET0:%.*]] = add i32 0, 1 @@ -76,7 +76,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_1 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; IS__CGSCC____: if.true: ; IS__CGSCC____-NEXT: [[RET0:%.*]] = add i32 0, 1 @@ -112,7 +112,7 @@ ; ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_2 -; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] { +; IS__CGSCC____-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-NEXT: ret i32 1 ; %ret = tail call i32 @test2_1(i1 %c) @@ -122,7 +122,7 @@ declare void @use(i32) define void @test3(i1 %c) { ; CHECK-LABEL: define {{[^@]+}}@test3 -; CHECK-SAME: (i1 [[C:%.*]]) { +; CHECK-SAME: (i1 noundef [[C:%.*]]) { ; CHECK-NEXT: br i1 [[C]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]] ; CHECK: if.true: ; CHECK-NEXT: br label [[END:%.*]] Index: llvm/test/Transforms/Attributor/willreturn.ll =================================================================== --- llvm/test/Transforms/Attributor/willreturn.ll +++ llvm/test/Transforms/Attributor/willreturn.ll @@ -281,18 +281,18 @@ define void @mutual_recursion1(i1 %c) #0 { ; IS__TUNIT_OPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@mutual_recursion1 -; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__TUNIT_OPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__TUNIT_OPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__TUNIT_OPM: rec: ; IS__TUNIT_OPM-NEXT: call void @sink() #[[ATTR11:[0-9]+]] -; IS__TUNIT_OPM-NEXT: call void @mutual_recursion2(i1 [[C]]) #[[ATTR23:[0-9]+]] +; IS__TUNIT_OPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) #[[ATTR23:[0-9]+]] ; IS__TUNIT_OPM-NEXT: br label [[END]] ; IS__TUNIT_OPM: end: ; IS__TUNIT_OPM-NEXT: ret void ; ; IS__TUNIT_NPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@mutual_recursion1 -; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR3:[0-9]+]] { +; IS__TUNIT_NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR3:[0-9]+]] { ; IS__TUNIT_NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__TUNIT_NPM: rec: ; IS__TUNIT_NPM-NEXT: call void @sink() #[[ATTR11:[0-9]+]] @@ -303,18 +303,18 @@ ; ; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@mutual_recursion1 -; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR4:[0-9]+]] { +; IS__CGSCC_OPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__CGSCC_OPM: rec: ; IS__CGSCC_OPM-NEXT: call void @sink() #[[ATTR14:[0-9]+]] -; IS__CGSCC_OPM-NEXT: call void @mutual_recursion2(i1 [[C]]) #[[ATTR27:[0-9]+]] +; IS__CGSCC_OPM-NEXT: call void @mutual_recursion2(i1 noundef [[C]]) #[[ATTR27:[0-9]+]] ; IS__CGSCC_OPM-NEXT: br label [[END]] ; IS__CGSCC_OPM: end: ; IS__CGSCC_OPM-NEXT: ret void ; ; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind uwtable ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@mutual_recursion1 -; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR4:[0-9]+]] { +; IS__CGSCC_NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR4:[0-9]+]] { ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[REC:%.*]], label [[END:%.*]] ; IS__CGSCC_NPM: rec: ; IS__CGSCC_NPM-NEXT: call void @sink() #[[ATTR14:[0-9]+]] Index: llvm/test/Transforms/IndVarSimplify/X86/loop-invariant-conditions.ll =================================================================== --- llvm/test/Transforms/IndVarSimplify/X86/loop-invariant-conditions.ll +++ llvm/test/Transforms/IndVarSimplify/X86/loop-invariant-conditions.ll @@ -343,7 +343,7 @@ ; CHECK-NEXT: br label [[LOOP:%.*]] ; CHECK: loop: ; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ [[START]], [[ENTRY:%.*]] ], [ [[INDVARS_IV_NEXT:%.*]], [[BACKEDGE:%.*]] ] -; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add i64 [[INDVARS_IV]], 1 +; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add nsw i64 [[INDVARS_IV]], 1 ; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[INDVARS_IV_NEXT]], 25 ; CHECK-NEXT: br i1 [[CMP]], label [[BACKEDGE]], label [[FOR_END:%.*]] ; CHECK: backedge: Index: llvm/test/Transforms/IndVarSimplify/lftr-reuse.ll =================================================================== --- llvm/test/Transforms/IndVarSimplify/lftr-reuse.ll +++ llvm/test/Transforms/IndVarSimplify/lftr-reuse.ll @@ -67,7 +67,7 @@ ; CHECK-NEXT: [[CMP1:%.*]] = icmp slt i32 0, [[SUB1]] ; CHECK-NEXT: br i1 [[CMP1]], label [[OUTER_PREHEADER:%.*]], label [[EXIT:%.*]] ; CHECK: outer.preheader: -; CHECK-NEXT: [[TMP0:%.*]] = add i32 [[ARG]], -1 +; CHECK-NEXT: [[TMP0:%.*]] = add nsw i32 [[ARG]], -1 ; CHECK-NEXT: br label [[OUTER:%.*]] ; CHECK: outer: ; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i32 [ [[TMP0]], [[OUTER_PREHEADER]] ], [ [[INDVARS_IV_NEXT:%.*]], [[OUTER_INC:%.*]] ] Index: llvm/test/Transforms/InstCombine/dont-distribute-phi.ll =================================================================== --- llvm/test/Transforms/InstCombine/dont-distribute-phi.ll +++ llvm/test/Transforms/InstCombine/dont-distribute-phi.ll @@ -55,7 +55,7 @@ ; CHECK: bb_exit: ; CHECK-NEXT: [[PHI1:%.*]] = phi i1 [ [[CMP2]], [[BB_ELSE]] ], [ undef, [[BB_THEN]] ] ; CHECK-NEXT: [[XOR1:%.*]] = xor i1 [[CMP1]], true -; CHECK-NEXT: [[AND1:%.*]] = select i1 [[PHI1]], i1 [[XOR1]], i1 false +; CHECK-NEXT: [[AND1:%.*]] = and i1 [[PHI1]], [[XOR1]] ; CHECK-NEXT: ret i1 [[AND1]] ; Index: llvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll =================================================================== --- llvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll +++ llvm/test/Transforms/LoopUnroll/runtime-small-upperbound.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt -S -loop-unroll -unroll-runtime %s -o - | FileCheck %s -; RUN: opt -S -loop-unroll -unroll-runtime -unroll-max-upperbound=6 %s -o - | FileCheck %s --check-prefix=UPPER +; RUN: opt -S -loop-unroll -unroll-runtime -unroll-max-upperbound=4 %s -o - | FileCheck %s --check-prefix=UPPER target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" @@ -103,9 +103,9 @@ ; UPPER-NEXT: [[TMP1:%.*]] = sub i32 16, [[X]] ; UPPER-NEXT: [[TMP2:%.*]] = lshr i32 [[TMP1]], 2 ; UPPER-NEXT: [[TMP3:%.*]] = add nuw nsw i32 [[TMP2]], 1 -; UPPER-NEXT: [[TMP4:%.*]] = urem i32 [[TMP2]], 6 +; UPPER-NEXT: [[TMP4:%.*]] = urem i32 [[TMP2]], 5 ; UPPER-NEXT: [[TMP5:%.*]] = add i32 [[TMP4]], 1 -; UPPER-NEXT: [[XTRAITER:%.*]] = urem i32 [[TMP5]], 6 +; UPPER-NEXT: [[XTRAITER:%.*]] = urem i32 [[TMP5]], 5 ; UPPER-NEXT: [[LCMP_MOD:%.*]] = icmp ne i32 [[XTRAITER]], 0 ; UPPER-NEXT: br i1 [[LCMP_MOD]], label [[LOOP_PROL_PREHEADER:%.*]], label [[LOOP_PROL_LOOPEXIT:%.*]] ; UPPER: loop.prol.preheader: @@ -128,13 +128,13 @@ ; UPPER: loop.prol.loopexit: ; UPPER-NEXT: [[IV_UNR:%.*]] = phi i32 [ [[X]], [[LOOP_PREHEADER]] ], [ [[IV_UNR_PH]], [[LOOP_PROL_LOOPEXIT_UNR_LCSSA]] ] ; UPPER-NEXT: [[PTR_UNR:%.*]] = phi i8* [ [[Y]], [[LOOP_PREHEADER]] ], [ [[PTR_UNR_PH]], [[LOOP_PROL_LOOPEXIT_UNR_LCSSA]] ] -; UPPER-NEXT: [[TMP7:%.*]] = icmp ult i32 [[TMP2]], 5 +; UPPER-NEXT: [[TMP7:%.*]] = icmp ult i32 [[TMP2]], 4 ; UPPER-NEXT: br i1 [[TMP7]], label [[EXIT_LOOPEXIT:%.*]], label [[LOOP_PREHEADER_NEW:%.*]] ; UPPER: loop.preheader.new: ; UPPER-NEXT: br label [[LOOP:%.*]] ; UPPER: loop: -; UPPER-NEXT: [[IV:%.*]] = phi i32 [ [[IV_UNR]], [[LOOP_PREHEADER_NEW]] ], [ [[IV_NEXT_5:%.*]], [[LOOP]] ] -; UPPER-NEXT: [[PTR:%.*]] = phi i8* [ [[PTR_UNR]], [[LOOP_PREHEADER_NEW]] ], [ [[PTR_NEXT_5:%.*]], [[LOOP]] ] +; UPPER-NEXT: [[IV:%.*]] = phi i32 [ [[IV_UNR]], [[LOOP_PREHEADER_NEW]] ], [ [[IV_NEXT_4:%.*]], [[LOOP]] ] +; UPPER-NEXT: [[PTR:%.*]] = phi i8* [ [[PTR_UNR]], [[LOOP_PREHEADER_NEW]] ], [ [[PTR_NEXT_4:%.*]], [[LOOP]] ] ; UPPER-NEXT: [[IV_NEXT:%.*]] = add nuw i32 [[IV]], 4 ; UPPER-NEXT: [[PTR_NEXT:%.*]] = getelementptr inbounds i8, i8* [[PTR]], i32 1 ; UPPER-NEXT: store i8 [[ARG]], i8* [[PTR_NEXT]], align 1 @@ -147,13 +147,10 @@ ; UPPER-NEXT: [[IV_NEXT_3:%.*]] = add nuw i32 [[IV_NEXT_2]], 4 ; UPPER-NEXT: [[PTR_NEXT_3:%.*]] = getelementptr inbounds i8, i8* [[PTR_NEXT_2]], i32 1 ; UPPER-NEXT: store i8 [[ARG]], i8* [[PTR_NEXT_3]], align 1 -; UPPER-NEXT: [[IV_NEXT_4:%.*]] = add nuw i32 [[IV_NEXT_3]], 4 -; UPPER-NEXT: [[PTR_NEXT_4:%.*]] = getelementptr inbounds i8, i8* [[PTR_NEXT_3]], i32 1 +; UPPER-NEXT: [[IV_NEXT_4]] = add nuw i32 [[IV_NEXT_3]], 4 +; UPPER-NEXT: [[PTR_NEXT_4]] = getelementptr inbounds i8, i8* [[PTR_NEXT_3]], i32 1 ; UPPER-NEXT: store i8 [[ARG]], i8* [[PTR_NEXT_4]], align 1 -; UPPER-NEXT: [[IV_NEXT_5]] = add nuw i32 [[IV_NEXT_4]], 4 -; UPPER-NEXT: [[PTR_NEXT_5]] = getelementptr inbounds i8, i8* [[PTR_NEXT_4]], i32 1 -; UPPER-NEXT: store i8 [[ARG]], i8* [[PTR_NEXT_5]], align 1 -; UPPER-NEXT: [[TMP8:%.*]] = icmp ult i32 [[IV_NEXT_5]], 17 +; UPPER-NEXT: [[TMP8:%.*]] = icmp ult i32 [[IV_NEXT_4]], 17 ; UPPER-NEXT: br i1 [[TMP8]], label [[LOOP]], label [[EXIT_LOOPEXIT_UNR_LCSSA:%.*]] ; UPPER: exit.loopexit.unr-lcssa: ; UPPER-NEXT: br label [[EXIT_LOOPEXIT]] Index: llvm/test/Transforms/LoopVectorize/X86/small-size.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/X86/small-size.ll +++ llvm/test/Transforms/LoopVectorize/X86/small-size.ll @@ -136,7 +136,7 @@ ; CHECK-NEXT: [[TMP17:%.*]] = icmp eq i32 [[N]], 0 ; CHECK-NEXT: br i1 [[TMP17]], label [[DOT_CRIT_EDGE:%.*]], label [[DOTLR_PH_PREHEADER:%.*]] ; CHECK: .lr.ph.preheader: -; CHECK-NEXT: [[TMP18:%.*]] = add i32 [[N]], -1 +; CHECK-NEXT: [[TMP18:%.*]] = add nsw i32 [[N]], -1 ; CHECK-NEXT: [[TMP19:%.*]] = zext i32 [[TMP18]] to i64 ; CHECK-NEXT: br i1 false, label [[SCALAR_PH8:%.*]], label [[VECTOR_PH10:%.*]] ; CHECK: vector.ph10: @@ -314,7 +314,7 @@ ; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i32 [[N:%.*]], 0 ; CHECK-NEXT: br i1 [[TMP1]], label [[DOT_CRIT_EDGE:%.*]], label [[DOTLR_PH_PREHEADER:%.*]] ; CHECK: .lr.ph.preheader: -; CHECK-NEXT: [[TMP2:%.*]] = add i32 [[N]], -1 +; CHECK-NEXT: [[TMP2:%.*]] = add nsw i32 [[N]], -1 ; CHECK-NEXT: [[TMP3:%.*]] = zext i32 [[TMP2]] to i64 ; CHECK-NEXT: br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]] ; CHECK: vector.ph: Index: llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll +++ llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll @@ -65,7 +65,7 @@ %tmp1 = getelementptr inbounds i32, i32* %a, i64 %i %tmp2 = load i32, i32* %tmp1, align 8 %tmp3 = add i32 %tmp0, %tmp2 - %i.next = add nuw nsw i64 %i, -1 + %i.next = add nsw i64 %i, -1 %cond = icmp sgt i64 %i.next, 0 br i1 %cond, label %for.body, label %for.end @@ -181,7 +181,7 @@ %tmp4 = load i32, i32* %tmp2, align 8 %tmp5 = add i32 %tmp3, %tmp4 %tmp6 = add i32 %tmp0, %tmp5 - %i.next = add nuw nsw i64 %i, -1 + %i.next = add nsw i64 %i, -1 %cond = icmp sgt i64 %i.next, 0 br i1 %cond, label %for.body, label %for.end Index: llvm/unittests/Analysis/ValueTrackingTest.cpp =================================================================== --- llvm/unittests/Analysis/ValueTrackingTest.cpp +++ llvm/unittests/Analysis/ValueTrackingTest.cpp @@ -890,6 +890,33 @@ EXPECT_EQ(programUndefinedIfUndefOrPoison(A), false); } +TEST_F(ValueTrackingTest, programUndefinedIfPoison_br) { + parseAssembly("declare i32 @any_num()" + "define void @test(i32 %mask) {\n" + " %A = call i32 @any_num()\n" + " %C = icmp eq i32 %A, 0\n" + " br i1 %C, label %l1, label %l2\n" + "l1:\n" + " ret void\n" + "l2:\n" + " ret void\n" + "}\n"); + EXPECT_EQ(programUndefinedIfPoison(A), true); +} + +TEST_F(ValueTrackingTest, programUndefinedIfPoison_switch) { + parseAssembly("declare i32 @any_num()" + "define void @test(i32 %mask) {\n" + " %A = call i32 @any_num()\n" + " switch i32 %A, label %l1 [ i32 0, label %l2]\n" + "l1:\n" + " ret void\n" + "l2:\n" + " ret void\n" + "}\n"); + EXPECT_EQ(programUndefinedIfPoison(A), true); +} + TEST_F(ValueTrackingTest, isGuaranteedNotToBePoison_exploitBranchCond) { parseAssembly("declare i1 @any_bool()" "define void @test(i1 %y) {\n" Index: polly/test/DeLICM/pr41656.ll =================================================================== --- polly/test/DeLICM/pr41656.ll +++ polly/test/DeLICM/pr41656.ll @@ -82,7 +82,7 @@ ; CHECK: Invalid Context: -; CHECK-NEXT: [call24] -> { : call24 <= 2 } +; CHECK-NEXT: [call24] -> { : false } ; CHECK: Defined Behavior Context: ; CHECK-NEXT: [call24] -> { : 3 <= call24 <= 2147483647 }