[InstCombine] Use update_test_checks.py to regenerate a test. NFC

llvm-svn: 298227
This commit is contained in:
Craig Topper 2017-03-19 17:04:52 +00:00
parent 8424df7dea
commit ff2283ec0e
1 changed files with 78 additions and 78 deletions

View File

@ -15,7 +15,7 @@ define i32 @test1(i32 %A) {
define i32 @test2(i32 %A) {
; CHECK-LABEL: @test2(
; CHECK-NEXT: ret i32 %A
; CHECK-NEXT: ret i32 [[A:%.*]]
;
%B = sub i32 %A, 0
ret i32 %B
@ -23,7 +23,7 @@ define i32 @test2(i32 %A) {
define i32 @test3(i32 %A) {
; CHECK-LABEL: @test3(
; CHECK-NEXT: ret i32 %A
; CHECK-NEXT: ret i32 [[A:%.*]]
;
%B = sub i32 0, %A
%C = sub i32 0, %B
@ -32,7 +32,7 @@ define i32 @test3(i32 %A) {
define i32 @test4(i32 %A, i32 %x) {
; CHECK-LABEL: @test4(
; CHECK-NEXT: [[C:%.*]] = add i32 %x, %A
; CHECK-NEXT: [[C:%.*]] = add i32 [[X:%.*]], [[A:%.*]]
; CHECK-NEXT: ret i32 [[C]]
;
%B = sub i32 0, %A
@ -42,8 +42,8 @@ define i32 @test4(i32 %A, i32 %x) {
define i32 @test5(i32 %A, i32 %B, i32 %C) {
; CHECK-LABEL: @test5(
; CHECK-NEXT: [[D1:%.*]] = sub i32 %C, %B
; CHECK-NEXT: [[E:%.*]] = add i32 [[D1]], %A
; CHECK-NEXT: [[D1:%.*]] = sub i32 [[C:%.*]], [[B:%.*]]
; CHECK-NEXT: [[E:%.*]] = add i32 [[D1]], [[A:%.*]]
; CHECK-NEXT: ret i32 [[E]]
;
%D = sub i32 %B, %C
@ -53,8 +53,8 @@ define i32 @test5(i32 %A, i32 %B, i32 %C) {
define i32 @test6(i32 %A, i32 %B) {
; CHECK-LABEL: @test6(
; CHECK-NEXT: [[B_NOT:%.*]] = xor i32 %B, -1
; CHECK-NEXT: [[D:%.*]] = and i32 [[B_NOT]], %A
; CHECK-NEXT: [[B_NOT:%.*]] = xor i32 [[B:%.*]], -1
; CHECK-NEXT: [[D:%.*]] = and i32 [[B_NOT]], [[A:%.*]]
; CHECK-NEXT: ret i32 [[D]]
;
%C = and i32 %A, %B
@ -64,7 +64,7 @@ define i32 @test6(i32 %A, i32 %B) {
define i32 @test7(i32 %A) {
; CHECK-LABEL: @test7(
; CHECK-NEXT: [[B:%.*]] = xor i32 %A, -1
; CHECK-NEXT: [[B:%.*]] = xor i32 [[A:%.*]], -1
; CHECK-NEXT: ret i32 [[B]]
;
%B = sub i32 -1, %A
@ -73,7 +73,7 @@ define i32 @test7(i32 %A) {
define i32 @test8(i32 %A) {
; CHECK-LABEL: @test8(
; CHECK-NEXT: [[C:%.*]] = shl i32 %A, 3
; CHECK-NEXT: [[C:%.*]] = shl i32 [[A:%.*]], 3
; CHECK-NEXT: ret i32 [[C]]
;
%B = mul i32 9, %A
@ -83,7 +83,7 @@ define i32 @test8(i32 %A) {
define i32 @test9(i32 %A) {
; CHECK-LABEL: @test9(
; CHECK-NEXT: [[C:%.*]] = mul i32 %A, -2
; CHECK-NEXT: [[C:%.*]] = mul i32 [[A:%.*]], -2
; CHECK-NEXT: ret i32 [[C]]
;
%B = mul i32 3, %A
@ -93,7 +93,7 @@ define i32 @test9(i32 %A) {
define i32 @test10(i32 %A, i32 %B) {
; CHECK-LABEL: @test10(
; CHECK-NEXT: [[E:%.*]] = mul i32 %A, %B
; CHECK-NEXT: [[E:%.*]] = mul i32 [[A:%.*]], [[B:%.*]]
; CHECK-NEXT: ret i32 [[E]]
;
%C = sub i32 0, %A
@ -104,7 +104,7 @@ define i32 @test10(i32 %A, i32 %B) {
define i32 @test10a(i32 %A) {
; CHECK-LABEL: @test10a(
; CHECK-NEXT: [[E:%.*]] = mul i32 %A, -7
; CHECK-NEXT: [[E:%.*]] = mul i32 [[A:%.*]], -7
; CHECK-NEXT: ret i32 [[E]]
;
%C = sub i32 0, %A
@ -114,7 +114,7 @@ define i32 @test10a(i32 %A) {
define i1 @test11(i8 %A, i8 %B) {
; CHECK-LABEL: @test11(
; CHECK-NEXT: [[D:%.*]] = icmp ne i8 %A, %B
; CHECK-NEXT: [[D:%.*]] = icmp ne i8 [[A:%.*]], [[B:%.*]]
; CHECK-NEXT: ret i1 [[D]]
;
%C = sub i8 %A, %B
@ -124,7 +124,7 @@ define i1 @test11(i8 %A, i8 %B) {
define <2 x i1> @test11vec(<2 x i8> %A, <2 x i8> %B) {
; CHECK-LABEL: @test11vec(
; CHECK-NEXT: [[D:%.*]] = icmp ne <2 x i8> %A, %B
; CHECK-NEXT: [[D:%.*]] = icmp ne <2 x i8> [[A:%.*]], [[B:%.*]]
; CHECK-NEXT: ret <2 x i1> [[D]]
;
%C = sub <2 x i8> %A, %B
@ -134,7 +134,7 @@ define <2 x i1> @test11vec(<2 x i8> %A, <2 x i8> %B) {
define i32 @test12(i32 %A) {
; CHECK-LABEL: @test12(
; CHECK-NEXT: [[C:%.*]] = lshr i32 %A, 31
; CHECK-NEXT: [[C:%.*]] = lshr i32 [[A:%.*]], 31
; CHECK-NEXT: ret i32 [[C]]
;
%B = ashr i32 %A, 31
@ -144,7 +144,7 @@ define i32 @test12(i32 %A) {
define i32 @test13(i32 %A) {
; CHECK-LABEL: @test13(
; CHECK-NEXT: [[C:%.*]] = ashr i32 %A, 31
; CHECK-NEXT: [[C:%.*]] = ashr i32 [[A:%.*]], 31
; CHECK-NEXT: ret i32 [[C]]
;
%B = lshr i32 %A, 31
@ -154,7 +154,7 @@ define i32 @test13(i32 %A) {
define <2 x i32> @test12vec(<2 x i32> %A) {
; CHECK-LABEL: @test12vec(
; CHECK-NEXT: [[C:%.*]] = lshr <2 x i32> %A, <i32 31, i32 31>
; CHECK-NEXT: [[C:%.*]] = lshr <2 x i32> [[A:%.*]], <i32 31, i32 31>
; CHECK-NEXT: ret <2 x i32> [[C]]
;
%B = ashr <2 x i32> %A, <i32 31, i32 31>
@ -164,7 +164,7 @@ define <2 x i32> @test12vec(<2 x i32> %A) {
define <2 x i32> @test13vec(<2 x i32> %A) {
; CHECK-LABEL: @test13vec(
; CHECK-NEXT: [[C:%.*]] = ashr <2 x i32> %A, <i32 31, i32 31>
; CHECK-NEXT: [[C:%.*]] = ashr <2 x i32> [[A:%.*]], <i32 31, i32 31>
; CHECK-NEXT: ret <2 x i32> [[C]]
;
%B = lshr <2 x i32> %A, <i32 31, i32 31>
@ -174,8 +174,8 @@ define <2 x i32> @test13vec(<2 x i32> %A) {
define i32 @test15(i32 %A, i32 %B) {
; CHECK-LABEL: @test15(
; CHECK-NEXT: [[C:%.*]] = sub i32 0, %A
; CHECK-NEXT: [[D:%.*]] = srem i32 %B, [[C]]
; CHECK-NEXT: [[C:%.*]] = sub i32 0, [[A:%.*]]
; CHECK-NEXT: [[D:%.*]] = srem i32 [[B:%.*]], [[C]]
; CHECK-NEXT: ret i32 [[D]]
;
%C = sub i32 0, %A
@ -185,7 +185,7 @@ define i32 @test15(i32 %A, i32 %B) {
define i32 @test16(i32 %A) {
; CHECK-LABEL: @test16(
; CHECK-NEXT: [[Y:%.*]] = sdiv i32 %A, -1123
; CHECK-NEXT: [[Y:%.*]] = sdiv i32 [[A:%.*]], -1123
; CHECK-NEXT: ret i32 [[Y]]
;
%X = sdiv i32 %A, 1123
@ -197,7 +197,7 @@ define i32 @test16(i32 %A) {
; PR3142
define i32 @test17(i32 %A) {
; CHECK-LABEL: @test17(
; CHECK-NEXT: [[B:%.*]] = sub i32 0, %A
; CHECK-NEXT: [[B:%.*]] = sub i32 0, [[A:%.*]]
; CHECK-NEXT: [[C:%.*]] = sdiv i32 [[B]], 1234
; CHECK-NEXT: ret i32 [[C]]
;
@ -218,7 +218,7 @@ define i64 @test18(i64 %Y) {
define i32 @test19(i32 %X, i32 %Y) {
; CHECK-LABEL: @test19(
; CHECK-NEXT: ret i32 %X
; CHECK-NEXT: ret i32 [[X:%.*]]
;
%Z = sub i32 %X, %Y
%Q = add i32 %Z, %Y
@ -227,7 +227,7 @@ define i32 @test19(i32 %X, i32 %Y) {
define i1 @test20(i32 %g, i32 %h) {
; CHECK-LABEL: @test20(
; CHECK-NEXT: [[TMP_4:%.*]] = icmp ne i32 %h, 0
; CHECK-NEXT: [[TMP_4:%.*]] = icmp ne i32 [[H:%.*]], 0
; CHECK-NEXT: ret i1 [[TMP_4]]
;
%tmp.2 = sub i32 %g, %h
@ -237,7 +237,7 @@ define i1 @test20(i32 %g, i32 %h) {
define i1 @test21(i32 %g, i32 %h) {
; CHECK-LABEL: @test21(
; CHECK-NEXT: [[TMP_4:%.*]] = icmp ne i32 %h, 0
; CHECK-NEXT: [[TMP_4:%.*]] = icmp ne i32 [[H:%.*]], 0
; CHECK-NEXT: ret i1 [[TMP_4]]
;
%tmp.2 = sub i32 %g, %h
@ -248,7 +248,7 @@ define i1 @test21(i32 %g, i32 %h) {
; PR2298
define zeroext i1 @test22(i32 %a, i32 %b) nounwind {
; CHECK-LABEL: @test22(
; CHECK-NEXT: [[TMP5:%.*]] = icmp eq i32 %b, %a
; CHECK-NEXT: [[TMP5:%.*]] = icmp eq i32 [[B:%.*]], [[A:%.*]]
; CHECK-NEXT: ret i1 [[TMP5]]
;
%tmp2 = sub i32 0, %a
@ -260,7 +260,7 @@ define zeroext i1 @test22(i32 %a, i32 %b) nounwind {
; rdar://7362831
define i32 @test23(i8* %P, i64 %A){
; CHECK-LABEL: @test23(
; CHECK-NEXT: [[TMP1:%.*]] = trunc i64 %A to i32
; CHECK-NEXT: [[TMP1:%.*]] = trunc i64 [[A:%.*]] to i32
; CHECK-NEXT: ret i32 [[TMP1]]
;
%B = getelementptr inbounds i8, i8* %P, i64 %A
@ -274,7 +274,7 @@ define i32 @test23(i8* %P, i64 %A){
define i8 @test23_as1(i8 addrspace(1)* %P, i16 %A) {
; CHECK-LABEL: @test23_as1(
; CHECK-NEXT: [[TMP1:%.*]] = trunc i16 %A to i8
; CHECK-NEXT: [[TMP1:%.*]] = trunc i16 [[A:%.*]] to i8
; CHECK-NEXT: ret i8 [[TMP1]]
;
%B = getelementptr inbounds i8, i8 addrspace(1)* %P, i16 %A
@ -288,7 +288,7 @@ define i8 @test23_as1(i8 addrspace(1)* %P, i16 %A) {
define i64 @test24(i8* %P, i64 %A){
; CHECK-LABEL: @test24(
; CHECK-NEXT: ret i64 %A
; CHECK-NEXT: ret i64 [[A:%.*]]
;
%B = getelementptr inbounds i8, i8* %P, i64 %A
%C = ptrtoint i8* %B to i64
@ -299,7 +299,7 @@ define i64 @test24(i8* %P, i64 %A){
define i16 @test24_as1(i8 addrspace(1)* %P, i16 %A) {
; CHECK-LABEL: @test24_as1(
; CHECK-NEXT: ret i16 %A
; CHECK-NEXT: ret i16 [[A:%.*]]
;
%B = getelementptr inbounds i8, i8 addrspace(1)* %P, i16 %A
%C = ptrtoint i8 addrspace(1)* %B to i16
@ -310,7 +310,7 @@ define i16 @test24_as1(i8 addrspace(1)* %P, i16 %A) {
define i64 @test24a(i8* %P, i64 %A){
; CHECK-LABEL: @test24a(
; CHECK-NEXT: [[DIFF_NEG:%.*]] = sub i64 0, %A
; CHECK-NEXT: [[DIFF_NEG:%.*]] = sub i64 0, [[A:%.*]]
; CHECK-NEXT: ret i64 [[DIFF_NEG]]
;
%B = getelementptr inbounds i8, i8* %P, i64 %A
@ -322,7 +322,7 @@ define i64 @test24a(i8* %P, i64 %A){
define i16 @test24a_as1(i8 addrspace(1)* %P, i16 %A) {
; CHECK-LABEL: @test24a_as1(
; CHECK-NEXT: [[DIFF_NEG:%.*]] = sub i16 0, %A
; CHECK-NEXT: [[DIFF_NEG:%.*]] = sub i16 0, [[A:%.*]]
; CHECK-NEXT: ret i16 [[DIFF_NEG]]
;
%B = getelementptr inbounds i8, i8 addrspace(1)* %P, i16 %A
@ -337,7 +337,7 @@ define i16 @test24a_as1(i8 addrspace(1)* %P, i16 %A) {
define i64 @test24b(i8* %P, i64 %A){
; CHECK-LABEL: @test24b(
; CHECK-NEXT: [[B_IDX:%.*]] = shl nuw i64 %A, 1
; CHECK-NEXT: [[B_IDX:%.*]] = shl nuw i64 [[A:%.*]], 1
; CHECK-NEXT: ret i64 [[B_IDX]]
;
%B = getelementptr inbounds [42 x i16], [42 x i16]* @Arr, i64 0, i64 %A
@ -349,7 +349,7 @@ define i64 @test24b(i8* %P, i64 %A){
define i64 @test25(i8* %P, i64 %A){
; CHECK-LABEL: @test25(
; CHECK-NEXT: [[B_IDX:%.*]] = shl nuw i64 %A, 1
; CHECK-NEXT: [[B_IDX:%.*]] = shl nuw i64 [[A:%.*]], 1
; CHECK-NEXT: [[TMP1:%.*]] = add i64 [[B_IDX]], -84
; CHECK-NEXT: ret i64 [[TMP1]]
;
@ -363,7 +363,7 @@ define i64 @test25(i8* %P, i64 %A){
define i16 @test25_as1(i8 addrspace(1)* %P, i64 %A) {
; CHECK-LABEL: @test25_as1(
; CHECK-NEXT: [[TMP1:%.*]] = trunc i64 %A to i16
; CHECK-NEXT: [[TMP1:%.*]] = trunc i64 [[A:%.*]] to i16
; CHECK-NEXT: [[B_IDX:%.*]] = shl nuw i16 [[TMP1]], 1
; CHECK-NEXT: [[TMP2:%.*]] = add i16 [[B_IDX]], -84
; CHECK-NEXT: ret i16 [[TMP2]]
@ -376,7 +376,7 @@ define i16 @test25_as1(i8 addrspace(1)* %P, i64 %A) {
define i32 @test26(i32 %x) {
; CHECK-LABEL: @test26(
; CHECK-NEXT: [[NEG:%.*]] = shl i32 -3, %x
; CHECK-NEXT: [[NEG:%.*]] = shl i32 -3, [[X:%.*]]
; CHECK-NEXT: ret i32 [[NEG]]
;
%shl = shl i32 3, %x
@ -386,8 +386,8 @@ define i32 @test26(i32 %x) {
define i32 @test27(i32 %x, i32 %y) {
; CHECK-LABEL: @test27(
; CHECK-NEXT: [[TMP1:%.*]] = shl i32 %y, 3
; CHECK-NEXT: [[SUB:%.*]] = add i32 [[TMP1]], %x
; CHECK-NEXT: [[TMP1:%.*]] = shl i32 [[Y:%.*]], 3
; CHECK-NEXT: [[SUB:%.*]] = add i32 [[TMP1]], [[X:%.*]]
; CHECK-NEXT: ret i32 [[SUB]]
;
%mul = mul i32 %y, -8
@ -397,8 +397,8 @@ define i32 @test27(i32 %x, i32 %y) {
define i32 @test28(i32 %x, i32 %y, i32 %z) {
; CHECK-LABEL: @test28(
; CHECK-NEXT: [[TMP1:%.*]] = mul i32 %z, %y
; CHECK-NEXT: [[SUB:%.*]] = add i32 [[TMP1]], %x
; CHECK-NEXT: [[TMP1:%.*]] = mul i32 [[Z:%.*]], [[Y:%.*]]
; CHECK-NEXT: [[SUB:%.*]] = add i32 [[TMP1]], [[X:%.*]]
; CHECK-NEXT: ret i32 [[SUB]]
;
%neg = sub i32 0, %z
@ -409,7 +409,7 @@ define i32 @test28(i32 %x, i32 %y, i32 %z) {
define i64 @test29(i8* %foo, i64 %i, i64 %j) {
; CHECK-LABEL: @test29(
; CHECK-NEXT: [[TMP1:%.*]] = sub i64 %i, %j
; CHECK-NEXT: [[TMP1:%.*]] = sub i64 [[I:%.*]], [[J:%.*]]
; CHECK-NEXT: ret i64 [[TMP1]]
;
%gep1 = getelementptr inbounds i8, i8* %foo, i64 %i
@ -422,8 +422,8 @@ define i64 @test29(i8* %foo, i64 %i, i64 %j) {
define i64 @test30(i8* %foo, i64 %i, i64 %j) {
; CHECK-LABEL: @test30(
; CHECK-NEXT: [[GEP1_IDX:%.*]] = shl nuw i64 %i, 2
; CHECK-NEXT: [[TMP1:%.*]] = sub i64 [[GEP1_IDX]], %j
; CHECK-NEXT: [[GEP1_IDX:%.*]] = shl nuw i64 [[I:%.*]], 2
; CHECK-NEXT: [[TMP1:%.*]] = sub i64 [[GEP1_IDX]], [[J:%.*]]
; CHECK-NEXT: ret i64 [[TMP1]]
;
%bit = bitcast i8* %foo to i32*
@ -437,8 +437,8 @@ define i64 @test30(i8* %foo, i64 %i, i64 %j) {
define i16 @test30_as1(i8 addrspace(1)* %foo, i16 %i, i16 %j) {
; CHECK-LABEL: @test30_as1(
; CHECK-NEXT: [[GEP1_IDX:%.*]] = shl nuw i16 %i, 2
; CHECK-NEXT: [[TMP1:%.*]] = sub i16 [[GEP1_IDX]], %j
; CHECK-NEXT: [[GEP1_IDX:%.*]] = shl nuw i16 [[I:%.*]], 2
; CHECK-NEXT: [[TMP1:%.*]] = sub i16 [[GEP1_IDX]], [[J:%.*]]
; CHECK-NEXT: ret i16 [[TMP1]]
;
%bit = bitcast i8 addrspace(1)* %foo to i32 addrspace(1)*
@ -452,7 +452,7 @@ define i16 @test30_as1(i8 addrspace(1)* %foo, i16 %i, i16 %j) {
define <2 x i64> @test31(<2 x i64> %A) {
; CHECK-LABEL: @test31(
; CHECK-NEXT: [[SUB:%.*]] = add <2 x i64> %A, <i64 3, i64 4>
; CHECK-NEXT: [[SUB:%.*]] = add <2 x i64> [[A:%.*]], <i64 3, i64 4>
; CHECK-NEXT: ret <2 x i64> [[SUB]]
;
%xor = xor <2 x i64> %A, <i64 -1, i64 -1>
@ -462,7 +462,7 @@ define <2 x i64> @test31(<2 x i64> %A) {
define <2 x i64> @test32(<2 x i64> %A) {
; CHECK-LABEL: @test32(
; CHECK-NEXT: [[SUB:%.*]] = sub <2 x i64> <i64 3, i64 4>, %A
; CHECK-NEXT: [[SUB:%.*]] = sub <2 x i64> <i64 3, i64 4>, [[A:%.*]]
; CHECK-NEXT: ret <2 x i64> [[SUB]]
;
%add = add <2 x i64> %A, <i64 -1, i64 -1>
@ -472,7 +472,7 @@ define <2 x i64> @test32(<2 x i64> %A) {
define <2 x i64> @test33(<2 x i1> %A) {
; CHECK-LABEL: @test33(
; CHECK-NEXT: [[SUB:%.*]] = sext <2 x i1> %A to <2 x i64>
; CHECK-NEXT: [[SUB:%.*]] = sext <2 x i1> [[A:%.*]] to <2 x i64>
; CHECK-NEXT: ret <2 x i64> [[SUB]]
;
%ext = zext <2 x i1> %A to <2 x i64>
@ -482,7 +482,7 @@ define <2 x i64> @test33(<2 x i1> %A) {
define <2 x i64> @test34(<2 x i1> %A) {
; CHECK-LABEL: @test34(
; CHECK-NEXT: [[SUB:%.*]] = zext <2 x i1> %A to <2 x i64>
; CHECK-NEXT: [[SUB:%.*]] = zext <2 x i1> [[A:%.*]] to <2 x i64>
; CHECK-NEXT: ret <2 x i64> [[SUB]]
;
%ext = sext <2 x i1> %A to <2 x i64>
@ -492,7 +492,7 @@ define <2 x i64> @test34(<2 x i1> %A) {
define <2 x i64> @test35(<2 x i64> %A) {
; CHECK-LABEL: @test35(
; CHECK-NEXT: [[SUB:%.*]] = mul <2 x i64> %A, <i64 -2, i64 -3>
; CHECK-NEXT: [[SUB:%.*]] = mul <2 x i64> [[A:%.*]], <i64 -2, i64 -3>
; CHECK-NEXT: ret <2 x i64> [[SUB]]
;
%mul = mul <2 x i64> %A, <i64 3, i64 4>
@ -502,7 +502,7 @@ define <2 x i64> @test35(<2 x i64> %A) {
define <2 x i64> @test36(<2 x i64> %A) {
; CHECK-LABEL: @test36(
; CHECK-NEXT: [[SUB:%.*]] = mul <2 x i64> %A, <i64 7, i64 15>
; CHECK-NEXT: [[SUB:%.*]] = mul <2 x i64> [[A:%.*]], <i64 7, i64 15>
; CHECK-NEXT: ret <2 x i64> [[SUB]]
;
%shl = shl <2 x i64> %A, <i64 3, i64 4>
@ -512,7 +512,7 @@ define <2 x i64> @test36(<2 x i64> %A) {
define <2 x i32> @test37(<2 x i32> %A) {
; CHECK-LABEL: @test37(
; CHECK-NEXT: [[TMP1:%.*]] = icmp eq <2 x i32> %A, <i32 -2147483648, i32 -2147483648>
; CHECK-NEXT: [[TMP1:%.*]] = icmp eq <2 x i32> [[A:%.*]], <i32 -2147483648, i32 -2147483648>
; CHECK-NEXT: [[SUB:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
; CHECK-NEXT: ret <2 x i32> [[SUB]]
;
@ -523,7 +523,7 @@ define <2 x i32> @test37(<2 x i32> %A) {
define i32 @test38(i32 %A) {
; CHECK-LABEL: @test38(
; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i32 %A, -2147483648
; CHECK-NEXT: [[TMP1:%.*]] = icmp eq i32 [[A:%.*]], -2147483648
; CHECK-NEXT: [[SUB:%.*]] = sext i1 [[TMP1]] to i32
; CHECK-NEXT: ret i32 [[SUB]]
;
@ -534,7 +534,7 @@ define i32 @test38(i32 %A) {
define i32 @test39(i32 %A, i32 %x) {
; CHECK-LABEL: @test39(
; CHECK-NEXT: [[C:%.*]] = add i32 %x, %A
; CHECK-NEXT: [[C:%.*]] = add i32 [[X:%.*]], [[A:%.*]]
; CHECK-NEXT: ret i32 [[C]]
;
%B = sub i32 0, %A
@ -544,8 +544,8 @@ define i32 @test39(i32 %A, i32 %x) {
define i16 @test40(i16 %a, i16 %b) {
; CHECK-LABEL: @test40(
; CHECK-NEXT: [[ASHR:%.*]] = ashr i16 %a, 1
; CHECK-NEXT: [[ASHR1:%.*]] = ashr i16 %b, 1
; CHECK-NEXT: [[ASHR:%.*]] = ashr i16 [[A:%.*]], 1
; CHECK-NEXT: [[ASHR1:%.*]] = ashr i16 [[B:%.*]], 1
; CHECK-NEXT: [[SUB:%.*]] = sub nsw i16 [[ASHR]], [[ASHR1]]
; CHECK-NEXT: ret i16 [[SUB]]
;
@ -557,8 +557,8 @@ define i16 @test40(i16 %a, i16 %b) {
define i32 @test41(i16 %a, i16 %b) {
; CHECK-LABEL: @test41(
; CHECK-NEXT: [[CONV:%.*]] = sext i16 %a to i32
; CHECK-NEXT: [[CONV1:%.*]] = sext i16 %b to i32
; CHECK-NEXT: [[CONV:%.*]] = sext i16 [[A:%.*]] to i32
; CHECK-NEXT: [[CONV1:%.*]] = sext i16 [[B:%.*]] to i32
; CHECK-NEXT: [[SUB:%.*]] = sub nsw i32 [[CONV]], [[CONV1]]
; CHECK-NEXT: ret i32 [[SUB]]
;
@ -570,8 +570,8 @@ define i32 @test41(i16 %a, i16 %b) {
define i4 @test42(i4 %x, i4 %y) {
; CHECK-LABEL: @test42(
; CHECK-NEXT: [[A:%.*]] = and i4 %y, 7
; CHECK-NEXT: [[B:%.*]] = and i4 %x, 7
; CHECK-NEXT: [[A:%.*]] = and i4 [[Y:%.*]], 7
; CHECK-NEXT: [[B:%.*]] = and i4 [[X:%.*]], 7
; CHECK-NEXT: [[C:%.*]] = sub nsw i4 [[A]], [[B]]
; CHECK-NEXT: ret i4 [[C]]
;
@ -583,8 +583,8 @@ define i4 @test42(i4 %x, i4 %y) {
define i4 @test43(i4 %x, i4 %y) {
; CHECK-LABEL: @test43(
; CHECK-NEXT: [[A:%.*]] = or i4 %x, -8
; CHECK-NEXT: [[B:%.*]] = and i4 %y, 7
; CHECK-NEXT: [[A:%.*]] = or i4 [[X:%.*]], -8
; CHECK-NEXT: [[B:%.*]] = and i4 [[Y:%.*]], 7
; CHECK-NEXT: [[C:%.*]] = sub nuw i4 [[A]], [[B]]
; CHECK-NEXT: ret i4 [[C]]
;
@ -596,7 +596,7 @@ define i4 @test43(i4 %x, i4 %y) {
define i32 @test44(i32 %x) {
; CHECK-LABEL: @test44(
; CHECK-NEXT: [[SUB:%.*]] = add nsw i32 %x, -32768
; CHECK-NEXT: [[SUB:%.*]] = add nsw i32 [[X:%.*]], -32768
; CHECK-NEXT: ret i32 [[SUB]]
;
%sub = sub nsw i32 %x, 32768
@ -605,7 +605,7 @@ define i32 @test44(i32 %x) {
define i32 @test45(i32 %x, i32 %y) {
; CHECK-LABEL: @test45(
; CHECK-NEXT: [[SUB:%.*]] = and i32 %x, %y
; CHECK-NEXT: [[SUB:%.*]] = and i32 [[X:%.*]], [[Y:%.*]]
; CHECK-NEXT: ret i32 [[SUB]]
;
%or = or i32 %x, %y
@ -616,8 +616,8 @@ define i32 @test45(i32 %x, i32 %y) {
define i32 @test46(i32 %x, i32 %y) {
; CHECK-LABEL: @test46(
; CHECK-NEXT: [[X_NOT:%.*]] = xor i32 %x, -1
; CHECK-NEXT: [[SUB:%.*]] = and i32 [[X_NOT]], %y
; CHECK-NEXT: [[X_NOT:%.*]] = xor i32 [[X:%.*]], -1
; CHECK-NEXT: [[SUB:%.*]] = and i32 [[X_NOT]], [[Y:%.*]]
; CHECK-NEXT: ret i32 [[SUB]]
;
%or = or i32 %x, %y
@ -627,8 +627,8 @@ define i32 @test46(i32 %x, i32 %y) {
define i32 @test47(i1 %A, i32 %B, i32 %C, i32 %D) {
; CHECK-LABEL: @test47(
; CHECK-NEXT: [[TMP1:%.*]] = sub i32 %D, %C
; CHECK-NEXT: [[SUB:%.*]] = select i1 %A, i32 [[TMP1]], i32 0
; CHECK-NEXT: [[TMP1:%.*]] = sub i32 [[D:%.*]], [[C:%.*]]
; CHECK-NEXT: [[SUB:%.*]] = select i1 [[A:%.*]], i32 [[TMP1]], i32 0
; CHECK-NEXT: ret i32 [[SUB]]
;
%sel0 = select i1 %A, i32 %D, i32 %B
@ -639,8 +639,8 @@ define i32 @test47(i1 %A, i32 %B, i32 %C, i32 %D) {
define i32 @test48(i1 %A, i32 %B, i32 %C, i32 %D) {
; CHECK-LABEL: @test48(
; CHECK-NEXT: [[TMP1:%.*]] = sub i32 %D, %C
; CHECK-NEXT: [[SUB:%.*]] = select i1 %A, i32 0, i32 [[TMP1]]
; CHECK-NEXT: [[TMP1:%.*]] = sub i32 [[D:%.*]], [[C:%.*]]
; CHECK-NEXT: [[SUB:%.*]] = select i1 [[A:%.*]], i32 0, i32 [[TMP1]]
; CHECK-NEXT: ret i32 [[SUB]]
;
%sel0 = select i1 %A, i32 %B, i32 %D
@ -653,8 +653,8 @@ define i32 @test48(i1 %A, i32 %B, i32 %C, i32 %D) {
define i8 @bool_sext_sub(i8 %x, i1 %y) {
; CHECK-LABEL: @bool_sext_sub(
; CHECK-NEXT: [[TMP1:%.*]] = zext i1 %y to i8
; CHECK-NEXT: [[SUB:%.*]] = add i8 [[TMP1]], %x
; CHECK-NEXT: [[TMP1:%.*]] = zext i1 [[Y:%.*]] to i8
; CHECK-NEXT: [[SUB:%.*]] = add i8 [[TMP1]], [[X:%.*]]
; CHECK-NEXT: ret i8 [[SUB]]
;
%sext = sext i1 %y to i8
@ -666,8 +666,8 @@ define i8 @bool_sext_sub(i8 %x, i1 %y) {
define <2 x i8> @bool_sext_sub_vec(<2 x i8> %x, <2 x i1> %y) {
; CHECK-LABEL: @bool_sext_sub_vec(
; CHECK-NEXT: [[TMP1:%.*]] = zext <2 x i1> %y to <2 x i8>
; CHECK-NEXT: [[SUB:%.*]] = add <2 x i8> [[TMP1]], %x
; CHECK-NEXT: [[TMP1:%.*]] = zext <2 x i1> [[Y:%.*]] to <2 x i8>
; CHECK-NEXT: [[SUB:%.*]] = add <2 x i8> [[TMP1]], [[X:%.*]]
; CHECK-NEXT: ret <2 x i8> [[SUB]]
;
%sext = sext <2 x i1> %y to <2 x i8>
@ -679,8 +679,8 @@ define <2 x i8> @bool_sext_sub_vec(<2 x i8> %x, <2 x i1> %y) {
define <2 x i8> @bool_sext_sub_vec_nsw(<2 x i8> %x, <2 x i1> %y) {
; CHECK-LABEL: @bool_sext_sub_vec_nsw(
; CHECK-NEXT: [[TMP1:%.*]] = zext <2 x i1> %y to <2 x i8>
; CHECK-NEXT: [[SUB:%.*]] = add nsw <2 x i8> [[TMP1]], %x
; CHECK-NEXT: [[TMP1:%.*]] = zext <2 x i1> [[Y:%.*]] to <2 x i8>
; CHECK-NEXT: [[SUB:%.*]] = add nsw <2 x i8> [[TMP1]], [[X:%.*]]
; CHECK-NEXT: ret <2 x i8> [[SUB]]
;
%sext = sext <2 x i1> %y to <2 x i8>
@ -692,8 +692,8 @@ define <2 x i8> @bool_sext_sub_vec_nsw(<2 x i8> %x, <2 x i1> %y) {
define i8 @bool_sext_sub_nuw(i8 %x, i1 %y) {
; CHECK-LABEL: @bool_sext_sub_nuw(
; CHECK-NEXT: [[TMP1:%.*]] = zext i1 %y to i8
; CHECK-NEXT: [[SUB:%.*]] = add i8 [[TMP1]], %x
; CHECK-NEXT: [[TMP1:%.*]] = zext i1 [[Y:%.*]] to i8
; CHECK-NEXT: [[SUB:%.*]] = add i8 [[TMP1]], [[X:%.*]]
; CHECK-NEXT: ret i8 [[SUB]]
;
%sext = sext i1 %y to i8