diff --git a/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll b/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll index a2ca63d0a2d..300f78987b9 100644 --- a/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll +++ b/test/Transforms/SimplifyCFG/merge-cond-stores-2.ll @@ -19,126 +19,128 @@ define i32 @f(i32* %b) { ; CHECK-NEXT: [[AND1:%.*]] = and i32 [[TMP1]], 2 ; CHECK-NEXT: [[TOBOOL2:%.*]] = icmp eq i32 [[AND1]], 0 ; CHECK-NEXT: [[OR4:%.*]] = or i32 [[TMP1]], 1073741824 -; CHECK-NEXT: [[DOTOR4:%.*]] = select i1 [[TOBOOL2]], i32 [[TMP1]], i32 [[OR4]] +; CHECK-NEXT: [[SPEC_SELECT:%.*]] = select i1 [[TOBOOL2]], i32 [[TMP1]], i32 [[OR4]] ; CHECK-NEXT: [[TMP2:%.*]] = xor i1 [[TOBOOL]], true ; CHECK-NEXT: [[TMP3:%.*]] = xor i1 [[TOBOOL2]], true ; CHECK-NEXT: [[TMP4:%.*]] = or i1 [[TMP2]], [[TMP3]] -; CHECK-NEXT: [[AND6:%.*]] = and i32 [[DOTOR4]], 4 +; CHECK-NEXT: [[AND6:%.*]] = and i32 [[SPEC_SELECT]], 4 ; CHECK-NEXT: [[TOBOOL7:%.*]] = icmp eq i32 [[AND6]], 0 -; CHECK-NEXT: [[OR9:%.*]] = or i32 [[DOTOR4]], 536870912 -; CHECK-NEXT: [[DOTOR4_OR9:%.*]] = select i1 [[TOBOOL7]], i32 [[DOTOR4]], i32 [[OR9]] +; CHECK-NEXT: [[OR9:%.*]] = or i32 [[SPEC_SELECT]], 536870912 +; CHECK-NEXT: [[SPEC_SELECT1:%.*]] = select i1 [[TOBOOL7]], i32 [[SPEC_SELECT]], i32 [[OR9]] ; CHECK-NEXT: [[TMP5:%.*]] = xor i1 [[TMP4]], true ; CHECK-NEXT: [[TMP6:%.*]] = xor i1 [[TOBOOL7]], true ; CHECK-NEXT: [[TMP7:%.*]] = xor i1 [[TMP5]], true ; CHECK-NEXT: [[TMP8:%.*]] = or i1 [[TMP7]], [[TMP6]] -; CHECK-NEXT: [[AND11:%.*]] = and i32 [[DOTOR4_OR9]], 8 +; CHECK-NEXT: [[AND11:%.*]] = and i32 [[SPEC_SELECT1]], 8 ; CHECK-NEXT: [[TOBOOL12:%.*]] = icmp eq i32 [[AND11]], 0 -; CHECK-NEXT: [[OR14:%.*]] = or i32 [[DOTOR4_OR9]], 268435456 -; CHECK-NEXT: [[DOTOR4_OR9_OR14:%.*]] = select i1 [[TOBOOL12]], i32 [[DOTOR4_OR9]], i32 [[OR14]] +; CHECK-NEXT: [[OR14:%.*]] = or i32 [[SPEC_SELECT1]], 268435456 +; CHECK-NEXT: [[SPEC_SELECT2:%.*]] = select i1 [[TOBOOL12]], i32 [[SPEC_SELECT1]], i32 [[OR14]] ; CHECK-NEXT: [[TMP9:%.*]] = xor i1 [[TMP8]], true ; CHECK-NEXT: [[TMP10:%.*]] = xor i1 [[TOBOOL12]], true ; CHECK-NEXT: [[TMP11:%.*]] = xor i1 [[TMP9]], true ; CHECK-NEXT: [[TMP12:%.*]] = or i1 [[TMP11]], [[TMP10]] -; CHECK-NEXT: [[AND16:%.*]] = and i32 [[DOTOR4_OR9_OR14]], 16 +; CHECK-NEXT: [[AND16:%.*]] = and i32 [[SPEC_SELECT2]], 16 ; CHECK-NEXT: [[TOBOOL17:%.*]] = icmp eq i32 [[AND16]], 0 -; CHECK-NEXT: [[OR19:%.*]] = or i32 [[DOTOR4_OR9_OR14]], 134217728 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19:%.*]] = select i1 [[TOBOOL17]], i32 [[DOTOR4_OR9_OR14]], i32 [[OR19]] +; CHECK-NEXT: [[OR19:%.*]] = or i32 [[SPEC_SELECT2]], 134217728 +; CHECK-NEXT: [[SPEC_SELECT3:%.*]] = select i1 [[TOBOOL17]], i32 [[SPEC_SELECT2]], i32 [[OR19]] ; CHECK-NEXT: [[TMP13:%.*]] = xor i1 [[TMP12]], true ; CHECK-NEXT: [[TMP14:%.*]] = xor i1 [[TOBOOL17]], true ; CHECK-NEXT: [[TMP15:%.*]] = xor i1 [[TMP13]], true ; CHECK-NEXT: [[TMP16:%.*]] = or i1 [[TMP15]], [[TMP14]] -; CHECK-NEXT: [[AND21:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19]], 32 +; CHECK-NEXT: [[AND21:%.*]] = and i32 [[SPEC_SELECT3]], 32 ; CHECK-NEXT: [[TOBOOL22:%.*]] = icmp eq i32 [[AND21]], 0 -; CHECK-NEXT: [[OR24:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19]], 67108864 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24:%.*]] = select i1 [[TOBOOL22]], i32 [[DOTOR4_OR9_OR14_OR19]], i32 [[OR24]] +; CHECK-NEXT: [[OR24:%.*]] = or i32 [[SPEC_SELECT3]], 67108864 +; CHECK-NEXT: [[SPEC_SELECT4:%.*]] = select i1 [[TOBOOL22]], i32 [[SPEC_SELECT3]], i32 [[OR24]] ; CHECK-NEXT: [[TMP17:%.*]] = xor i1 [[TMP16]], true ; CHECK-NEXT: [[TMP18:%.*]] = xor i1 [[TOBOOL22]], true ; CHECK-NEXT: [[TMP19:%.*]] = xor i1 [[TMP17]], true ; CHECK-NEXT: [[TMP20:%.*]] = or i1 [[TMP19]], [[TMP18]] -; CHECK-NEXT: [[AND26:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19_OR24]], 64 +; CHECK-NEXT: [[AND26:%.*]] = and i32 [[SPEC_SELECT4]], 64 ; CHECK-NEXT: [[TOBOOL27:%.*]] = icmp eq i32 [[AND26]], 0 -; CHECK-NEXT: [[OR29:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19_OR24]], 33554432 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24_OR29:%.*]] = select i1 [[TOBOOL27]], i32 [[DOTOR4_OR9_OR14_OR19_OR24]], i32 [[OR29]] +; CHECK-NEXT: [[OR29:%.*]] = or i32 [[SPEC_SELECT4]], 33554432 +; CHECK-NEXT: [[SPEC_SELECT5:%.*]] = select i1 [[TOBOOL27]], i32 [[SPEC_SELECT4]], i32 [[OR29]] ; CHECK-NEXT: [[TMP21:%.*]] = xor i1 [[TMP20]], true ; CHECK-NEXT: [[TMP22:%.*]] = xor i1 [[TOBOOL27]], true ; CHECK-NEXT: [[TMP23:%.*]] = xor i1 [[TMP21]], true ; CHECK-NEXT: [[TMP24:%.*]] = or i1 [[TMP23]], [[TMP22]] -; CHECK-NEXT: [[AND31:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29]], 256 +; CHECK-NEXT: [[AND31:%.*]] = and i32 [[SPEC_SELECT5]], 256 ; CHECK-NEXT: [[TOBOOL32:%.*]] = icmp eq i32 [[AND31]], 0 -; CHECK-NEXT: [[OR34:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29]], 8388608 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34:%.*]] = select i1 [[TOBOOL32]], i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29]], i32 [[OR34]] +; CHECK-NEXT: [[OR34:%.*]] = or i32 [[SPEC_SELECT5]], 8388608 +; CHECK-NEXT: [[SPEC_SELECT6:%.*]] = select i1 [[TOBOOL32]], i32 [[SPEC_SELECT5]], i32 [[OR34]] ; CHECK-NEXT: [[TMP25:%.*]] = xor i1 [[TMP24]], true ; CHECK-NEXT: [[TMP26:%.*]] = xor i1 [[TOBOOL32]], true ; CHECK-NEXT: [[TMP27:%.*]] = xor i1 [[TMP25]], true ; CHECK-NEXT: [[TMP28:%.*]] = or i1 [[TMP27]], [[TMP26]] -; CHECK-NEXT: [[AND36:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34]], 512 +; CHECK-NEXT: [[AND36:%.*]] = and i32 [[SPEC_SELECT6]], 512 ; CHECK-NEXT: [[TOBOOL37:%.*]] = icmp eq i32 [[AND36]], 0 -; CHECK-NEXT: [[OR39:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34]], 4194304 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39:%.*]] = select i1 [[TOBOOL37]], i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34]], i32 [[OR39]] +; CHECK-NEXT: [[OR39:%.*]] = or i32 [[SPEC_SELECT6]], 4194304 +; CHECK-NEXT: [[SPEC_SELECT7:%.*]] = select i1 [[TOBOOL37]], i32 [[SPEC_SELECT6]], i32 [[OR39]] ; CHECK-NEXT: [[TMP29:%.*]] = xor i1 [[TMP28]], true ; CHECK-NEXT: [[TMP30:%.*]] = xor i1 [[TOBOOL37]], true ; CHECK-NEXT: [[TMP31:%.*]] = xor i1 [[TMP29]], true ; CHECK-NEXT: [[TMP32:%.*]] = or i1 [[TMP31]], [[TMP30]] -; CHECK-NEXT: [[AND41:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39]], 1024 +; CHECK-NEXT: [[AND41:%.*]] = and i32 [[SPEC_SELECT7]], 1024 ; CHECK-NEXT: [[TOBOOL42:%.*]] = icmp eq i32 [[AND41]], 0 -; CHECK-NEXT: [[OR44:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39]], 2097152 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44:%.*]] = select i1 [[TOBOOL42]], i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39]], i32 [[OR44]] +; CHECK-NEXT: [[OR44:%.*]] = or i32 [[SPEC_SELECT7]], 2097152 +; CHECK-NEXT: [[SPEC_SELECT8:%.*]] = select i1 [[TOBOOL42]], i32 [[SPEC_SELECT7]], i32 [[OR44]] ; CHECK-NEXT: [[TMP33:%.*]] = xor i1 [[TMP32]], true ; CHECK-NEXT: [[TMP34:%.*]] = xor i1 [[TOBOOL42]], true ; CHECK-NEXT: [[TMP35:%.*]] = xor i1 [[TMP33]], true ; CHECK-NEXT: [[TMP36:%.*]] = or i1 [[TMP35]], [[TMP34]] -; CHECK-NEXT: [[AND46:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44]], 2048 +; CHECK-NEXT: [[AND46:%.*]] = and i32 [[SPEC_SELECT8]], 2048 ; CHECK-NEXT: [[TOBOOL47:%.*]] = icmp eq i32 [[AND46]], 0 -; CHECK-NEXT: [[OR49:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44]], 1048576 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49:%.*]] = select i1 [[TOBOOL47]], i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44]], i32 [[OR49]] +; CHECK-NEXT: [[OR49:%.*]] = or i32 [[SPEC_SELECT8]], 1048576 +; CHECK-NEXT: [[SPEC_SELECT9:%.*]] = select i1 [[TOBOOL47]], i32 [[SPEC_SELECT8]], i32 [[OR49]] ; CHECK-NEXT: [[TMP37:%.*]] = xor i1 [[TMP36]], true ; CHECK-NEXT: [[TMP38:%.*]] = xor i1 [[TOBOOL47]], true ; CHECK-NEXT: [[TMP39:%.*]] = xor i1 [[TMP37]], true ; CHECK-NEXT: [[TMP40:%.*]] = or i1 [[TMP39]], [[TMP38]] -; CHECK-NEXT: [[AND51:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49]], 4096 +; CHECK-NEXT: [[AND51:%.*]] = and i32 [[SPEC_SELECT9]], 4096 ; CHECK-NEXT: [[TOBOOL52:%.*]] = icmp eq i32 [[AND51]], 0 -; CHECK-NEXT: [[OR54:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49]], 524288 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54:%.*]] = select i1 [[TOBOOL52]], i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49]], i32 [[OR54]] +; CHECK-NEXT: [[OR54:%.*]] = or i32 [[SPEC_SELECT9]], 524288 +; CHECK-NEXT: [[SPEC_SELECT10:%.*]] = select i1 [[TOBOOL52]], i32 [[SPEC_SELECT9]], i32 [[OR54]] ; CHECK-NEXT: [[TMP41:%.*]] = xor i1 [[TMP40]], true ; CHECK-NEXT: [[TMP42:%.*]] = xor i1 [[TOBOOL52]], true ; CHECK-NEXT: [[TMP43:%.*]] = xor i1 [[TMP41]], true ; CHECK-NEXT: [[TMP44:%.*]] = or i1 [[TMP43]], [[TMP42]] -; CHECK-NEXT: [[AND56:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54]], 8192 +; CHECK-NEXT: [[AND56:%.*]] = and i32 [[SPEC_SELECT10]], 8192 ; CHECK-NEXT: [[TOBOOL57:%.*]] = icmp eq i32 [[AND56]], 0 -; CHECK-NEXT: [[OR59:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54]], 262144 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59:%.*]] = select i1 [[TOBOOL57]], i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54]], i32 [[OR59]] +; CHECK-NEXT: [[OR59:%.*]] = or i32 [[SPEC_SELECT10]], 262144 +; CHECK-NEXT: [[SPEC_SELECT11:%.*]] = select i1 [[TOBOOL57]], i32 [[SPEC_SELECT10]], i32 [[OR59]] ; CHECK-NEXT: [[TMP45:%.*]] = xor i1 [[TMP44]], true ; CHECK-NEXT: [[TMP46:%.*]] = xor i1 [[TOBOOL57]], true ; CHECK-NEXT: [[TMP47:%.*]] = xor i1 [[TMP45]], true ; CHECK-NEXT: [[TMP48:%.*]] = or i1 [[TMP47]], [[TMP46]] -; CHECK-NEXT: [[AND61:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59]], 16384 +; CHECK-NEXT: [[AND61:%.*]] = and i32 [[SPEC_SELECT11]], 16384 ; CHECK-NEXT: [[TOBOOL62:%.*]] = icmp eq i32 [[AND61]], 0 -; CHECK-NEXT: [[OR64:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59]], 131072 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59_OR64:%.*]] = select i1 [[TOBOOL62]], i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59]], i32 [[OR64]] +; CHECK-NEXT: [[OR64:%.*]] = or i32 [[SPEC_SELECT11]], 131072 +; CHECK-NEXT: [[SPEC_SELECT12:%.*]] = select i1 [[TOBOOL62]], i32 [[SPEC_SELECT11]], i32 [[OR64]] ; CHECK-NEXT: [[TMP49:%.*]] = xor i1 [[TMP48]], true ; CHECK-NEXT: [[TMP50:%.*]] = xor i1 [[TOBOOL62]], true ; CHECK-NEXT: [[TMP51:%.*]] = xor i1 [[TMP49]], true ; CHECK-NEXT: [[TMP52:%.*]] = or i1 [[TMP51]], [[TMP50]] -; CHECK-NEXT: [[AND66:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59_OR64]], 32768 +; CHECK-NEXT: [[AND66:%.*]] = and i32 [[SPEC_SELECT12]], 32768 ; CHECK-NEXT: [[TOBOOL67:%.*]] = icmp eq i32 [[AND66]], 0 -; CHECK-NEXT: [[OR69:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59_OR64]], 65536 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59_OR64_OR69:%.*]] = select i1 [[TOBOOL67]], i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59_OR64]], i32 [[OR69]] +; CHECK-NEXT: [[OR69:%.*]] = or i32 [[SPEC_SELECT12]], 65536 +; CHECK-NEXT: [[SPEC_SELECT13:%.*]] = select i1 [[TOBOOL67]], i32 [[SPEC_SELECT12]], i32 [[OR69]] ; CHECK-NEXT: [[TMP53:%.*]] = xor i1 [[TMP52]], true ; CHECK-NEXT: [[TMP54:%.*]] = xor i1 [[TOBOOL67]], true ; CHECK-NEXT: [[TMP55:%.*]] = xor i1 [[TMP53]], true ; CHECK-NEXT: [[TMP56:%.*]] = or i1 [[TMP55]], [[TMP54]] -; CHECK-NEXT: [[AND71:%.*]] = and i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59_OR64_OR69]], 128 +; CHECK-NEXT: [[AND71:%.*]] = and i32 [[SPEC_SELECT13]], 128 ; CHECK-NEXT: [[TOBOOL72:%.*]] = icmp eq i32 [[AND71]], 0 -; CHECK-NEXT: [[OR74:%.*]] = or i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59_OR64_OR69]], 16777216 -; CHECK-NEXT: [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59_OR64_OR69_OR74:%.*]] = select i1 [[TOBOOL72]], i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59_OR64_OR69]], i32 [[OR74]] +; CHECK-NEXT: [[OR74:%.*]] = or i32 [[SPEC_SELECT13]], 16777216 +; CHECK-NEXT: [[SPEC_SELECT14:%.*]] = select i1 [[TOBOOL72]], i32 [[SPEC_SELECT13]], i32 [[OR74]] ; CHECK-NEXT: [[TMP57:%.*]] = xor i1 [[TMP56]], true ; CHECK-NEXT: [[TMP58:%.*]] = xor i1 [[TOBOOL72]], true ; CHECK-NEXT: [[TMP59:%.*]] = xor i1 [[TMP57]], true ; CHECK-NEXT: [[TMP60:%.*]] = or i1 [[TMP59]], [[TMP58]] ; CHECK-NEXT: br i1 [[TMP60]], label [[TMP61:%.*]], label [[TMP62:%.*]] -; CHECK: store i32 [[DOTOR4_OR9_OR14_OR19_OR24_OR29_OR34_OR39_OR44_OR49_OR54_OR59_OR64_OR69_OR74]], i32* [[B]], align 4 +; CHECK: 61: +; CHECK-NEXT: store i32 [[SPEC_SELECT14]], i32* [[B]], align 4 ; CHECK-NEXT: br label [[TMP62]] -; CHECK: ret i32 0 +; CHECK: 62: +; CHECK-NEXT: ret i32 0 ; entry: %0 = load i32, i32* %b, align 4 diff --git a/test/Transforms/SimplifyCFG/merge-cond-stores.ll b/test/Transforms/SimplifyCFG/merge-cond-stores.ll index fd629c8cec5..75767a09216 100644 --- a/test/Transforms/SimplifyCFG/merge-cond-stores.ll +++ b/test/Transforms/SimplifyCFG/merge-cond-stores.ll @@ -10,11 +10,13 @@ define void @test_simple(i32* %p, i32 %a, i32 %b) { ; CHECK-NEXT: [[TMP0:%.*]] = xor i1 [[X2]], true ; CHECK-NEXT: [[TMP1:%.*]] = or i1 [[X1]], [[TMP0]] ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP2:%.*]], label [[TMP3:%.*]] -; CHECK: [[NOT_X2:%.*]] = xor i1 [[X2]], true +; CHECK: 2: +; CHECK-NEXT: [[NOT_X2:%.*]] = xor i1 [[X2]], true ; CHECK-NEXT: [[SPEC_SELECT:%.*]] = zext i1 [[NOT_X2]] to i32 ; CHECK-NEXT: store i32 [[SPEC_SELECT]], i32* [[P:%.*]], align 4 ; CHECK-NEXT: br label [[TMP3]] -; CHECK: ret void +; CHECK: 3: +; CHECK-NEXT: ret void ; entry: %x1 = icmp eq i32 %a, 0 @@ -44,10 +46,12 @@ define void @test_simple_commuted(i32* %p, i32 %a, i32 %b) { ; CHECK-NEXT: [[X2:%.*]] = icmp eq i32 [[B:%.*]], 0 ; CHECK-NEXT: [[TMP0:%.*]] = or i1 [[X1]], [[X2]] ; CHECK-NEXT: br i1 [[TMP0]], label [[TMP1:%.*]], label [[TMP2:%.*]] -; CHECK: [[SPEC_SELECT:%.*]] = zext i1 [[X2]] to i32 +; CHECK: 1: +; CHECK-NEXT: [[SPEC_SELECT:%.*]] = zext i1 [[X2]] to i32 ; CHECK-NEXT: store i32 [[SPEC_SELECT]], i32* [[P:%.*]], align 4 ; CHECK-NEXT: br label [[TMP2]] -; CHECK: ret void +; CHECK: 2: +; CHECK-NEXT: ret void ; entry: %x1 = icmp eq i32 %a, 0 @@ -80,14 +84,16 @@ define void @test_recursive(i32* %p, i32 %a, i32 %b, i32 %c, i32 %d) { ; CHECK-NEXT: [[TMP3:%.*]] = xor i1 [[X4]], true ; CHECK-NEXT: [[TMP4:%.*]] = or i1 [[TMP2]], [[TMP3]] ; CHECK-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP6:%.*]] -; CHECK: [[X3:%.*]] = icmp eq i32 [[C]], 0 +; CHECK: 5: +; CHECK-NEXT: [[X3:%.*]] = icmp eq i32 [[C]], 0 ; CHECK-NEXT: [[X2:%.*]] = icmp ne i32 [[B]], 0 ; CHECK-NEXT: [[SPEC_SELECT:%.*]] = zext i1 [[X2]] to i32 ; CHECK-NEXT: [[SPEC_SELECT1:%.*]] = select i1 [[X3]], i32 [[SPEC_SELECT]], i32 2 ; CHECK-NEXT: [[SPEC_SELECT2:%.*]] = select i1 [[X4]], i32 [[SPEC_SELECT1]], i32 3 ; CHECK-NEXT: store i32 [[SPEC_SELECT2]], i32* [[P:%.*]], align 4 ; CHECK-NEXT: br label [[TMP6]] -; CHECK: ret void +; CHECK: 6: +; CHECK-NEXT: ret void ; entry: %x1 = icmp eq i32 %a, 0 @@ -271,10 +277,12 @@ define i32 @test_diamond_simple(i32* %p, i32* %q, i32 %a, i32 %b) { ; CHECK-NEXT: [[TMP0:%.*]] = or i32 [[A]], [[B]] ; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i32 [[TMP0]], 0 ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP3:%.*]], label [[TMP2:%.*]] -; CHECK: [[SIMPLIFYCFG_MERGE:%.*]] = select i1 [[X2]], i32 [[Z2]], i32 1 +; CHECK: 2: +; CHECK-NEXT: [[SIMPLIFYCFG_MERGE:%.*]] = select i1 [[X2]], i32 [[Z2]], i32 1 ; CHECK-NEXT: store i32 [[SIMPLIFYCFG_MERGE]], i32* [[P:%.*]], align 4 ; CHECK-NEXT: br label [[TMP3]] -; CHECK: ret i32 [[Z4]] +; CHECK: 3: +; CHECK-NEXT: ret i32 [[Z4]] ; entry: %x1 = icmp eq i32 %a, 0 @@ -380,7 +388,8 @@ define void @test_outer_if(i32* %p, i32 %a, i32 %b, i32 %c) { ; CHECK-NEXT: [[TMP0:%.*]] = xor i1 [[X2]], true ; CHECK-NEXT: [[TMP1:%.*]] = or i1 [[X1]], [[TMP0]] ; CHECK-NEXT: br i1 [[TMP1]], label [[TMP2:%.*]], label [[END]] -; CHECK: [[NOT_X2:%.*]] = xor i1 [[X2]], true +; CHECK: 2: +; CHECK-NEXT: [[NOT_X2:%.*]] = xor i1 [[X2]], true ; CHECK-NEXT: [[SPEC_SELECT:%.*]] = zext i1 [[NOT_X2]] to i32 ; CHECK-NEXT: store i32 [[SPEC_SELECT]], i32* [[P:%.*]], align 4 ; CHECK-NEXT: br label [[END]]