[llvm] 858b99d - [InstSimplify] Regenerate test checks (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 3 09:10:23 PST 2021
Author: Nikita Popov
Date: 2021-01-03T18:09:58+01:00
New Revision: 858b99d774f10fb59a3d9ddb8bcc7dc040490e39
URL: https://github.com/llvm/llvm-project/commit/858b99d774f10fb59a3d9ddb8bcc7dc040490e39
DIFF: https://github.com/llvm/llvm-project/commit/858b99d774f10fb59a3d9ddb8bcc7dc040490e39.diff
LOG: [InstSimplify] Regenerate test checks (NFC)
Added:
Modified:
llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll
llvm/test/Transforms/InstSimplify/undef.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll b/llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll
index 2c35ed7f3909..a0896b4880bd 100644
--- a/llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll
+++ b/llvm/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll
@@ -1,8 +1,20 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instsimplify -S | FileCheck %s
declare void @bar()
define void @test1() personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 {
+; CHECK-LABEL: @test1(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: invoke void @bar()
+; CHECK-NEXT: to label [[CONT:%.*]] unwind label [[LPAD:%.*]]
+; CHECK: cont:
+; CHECK-NEXT: ret void
+; CHECK: lpad:
+; CHECK-NEXT: [[EX:%.*]] = landingpad { i8*, i32 }
+; CHECK-NEXT: cleanup
+; CHECK-NEXT: resume { i8*, i32 } [[EX]]
+;
entry:
invoke void @bar() to label %cont unwind label %lpad
cont:
@@ -14,42 +26,46 @@ lpad:
%exc_ptr2 = insertvalue { i8*, i32 } undef, i8* %exc_ptr, 0
%filter2 = insertvalue { i8*, i32 } %exc_ptr2, i32 %filter, 1
resume { i8*, i32 } %filter2
-; CHECK-LABEL: @test1(
-; CHECK-NOT: extractvalue
-; CHECK-NOT: insertvalue
}
declare i32 @__gxx_personality_v0(i32, i64, i8*, i8*)
define { i8, i32 } @test2({ i8*, i32 } %x) {
+; CHECK-LABEL: @test2(
+; CHECK-NEXT: [[EX:%.*]] = extractvalue { i8*, i32 } [[X:%.*]], 1
+; CHECK-NEXT: [[INS:%.*]] = insertvalue { i8, i32 } undef, i32 [[EX]], 1
+; CHECK-NEXT: ret { i8, i32 } [[INS]]
+;
%ex = extractvalue { i8*, i32 } %x, 1
%ins = insertvalue { i8, i32 } undef, i32 %ex, 1
ret { i8, i32 } %ins
-; CHECK-LABEL: @test2(
}
define i32 @test3(i32 %a, float %b) {
+; CHECK-LABEL: @test3(
+; CHECK-NEXT: ret i32 [[A:%.*]]
+;
%agg1 = insertvalue {i32, float} undef, i32 %a, 0
%agg2 = insertvalue {i32, float} %agg1, float %b, 1
%ev = extractvalue {i32, float} %agg2, 0
ret i32 %ev
-; CHECK-LABEL: @test3(
-; CHECK: ret i32 %a
}
define i8 @test4(<8 x i8> %V) {
+; CHECK-LABEL: @test4(
+; CHECK-NEXT: [[ADD:%.*]] = add <8 x i8> [[V:%.*]], bitcast (<1 x double> <double 0x319BEB8FD172E36> to <8 x i8>)
+; CHECK-NEXT: [[EXTRACT:%.*]] = extractelement <8 x i8> [[ADD]], i32 6
+; CHECK-NEXT: ret i8 [[EXTRACT]]
+;
%add = add <8 x i8> %V, bitcast (double 0x319BEB8FD172E36 to <8 x i8>)
%extract = extractelement <8 x i8> %add, i32 6
ret i8 %extract
-; CHECK-LABEL: @test4(
-; CHECK: %[[add:.*]] = add <8 x i8> %V, bitcast (<1 x double> <double 0x319BEB8FD172E36> to <8 x i8>)
-; CHECK-NEXT: %[[extract:.*]] = extractelement <8 x i8> %[[add]], i32 6
-; CHECK-NEXT: ret i8 %[[extract]]
}
define i32 @test5(<4 x i32> %V) {
+; CHECK-LABEL: @test5(
+; CHECK-NEXT: ret i32 undef
+;
%extract = extractelement <4 x i32> %V, i32 undef
ret i32 %extract
}
-; CHECK-LABEL: @test5(
-; CHECK: ret i32 undef
diff --git a/llvm/test/Transforms/InstSimplify/undef.ll b/llvm/test/Transforms/InstSimplify/undef.ll
index 2d88f9f83ad7..b7c69a5b4e7f 100644
--- a/llvm/test/Transforms/InstSimplify/undef.ll
+++ b/llvm/test/Transforms/InstSimplify/undef.ll
@@ -1,8 +1,9 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -instsimplify -S < %s | FileCheck %s
define i64 @test0() {
; CHECK-LABEL: @test0(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = mul i64 undef, undef
ret i64 %r
@@ -10,7 +11,7 @@ define i64 @test0() {
define i64 @test1() {
; CHECK-LABEL: @test1(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = mul i64 3, undef
ret i64 %r
@@ -18,7 +19,7 @@ define i64 @test1() {
define i64 @test2() {
; CHECK-LABEL: @test2(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = mul i64 undef, 3
ret i64 %r
@@ -26,7 +27,7 @@ define i64 @test2() {
define i64 @test3() {
; CHECK-LABEL: @test3(
-; CHECK: ret i64 0
+; CHECK-NEXT: ret i64 0
;
%r = mul i64 undef, 6
ret i64 %r
@@ -34,7 +35,7 @@ define i64 @test3() {
define i64 @test4() {
; CHECK-LABEL: @test4(
-; CHECK: ret i64 0
+; CHECK-NEXT: ret i64 0
;
%r = mul i64 6, undef
ret i64 %r
@@ -42,7 +43,7 @@ define i64 @test4() {
define i64 @test5() {
; CHECK-LABEL: @test5(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = and i64 undef, undef
ret i64 %r
@@ -50,7 +51,7 @@ define i64 @test5() {
define i64 @test6() {
; CHECK-LABEL: @test6(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = or i64 undef, undef
ret i64 %r
@@ -58,7 +59,7 @@ define i64 @test6() {
define i64 @test7() {
; CHECK-LABEL: @test7(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = udiv i64 undef, 1
ret i64 %r
@@ -66,7 +67,7 @@ define i64 @test7() {
define i64 @test8() {
; CHECK-LABEL: @test8(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = sdiv i64 undef, 1
ret i64 %r
@@ -74,7 +75,7 @@ define i64 @test8() {
define i64 @test9() {
; CHECK-LABEL: @test9(
-; CHECK: ret i64 0
+; CHECK-NEXT: ret i64 0
;
%r = urem i64 undef, 1
ret i64 %r
@@ -82,7 +83,7 @@ define i64 @test9() {
define i64 @test10() {
; CHECK-LABEL: @test10(
-; CHECK: ret i64 0
+; CHECK-NEXT: ret i64 0
;
%r = srem i64 undef, 1
ret i64 %r
@@ -90,7 +91,7 @@ define i64 @test10() {
define i64 @test11() {
; CHECK-LABEL: @test11(
-; CHECK: ret i64 poison
+; CHECK-NEXT: ret i64 poison
;
%r = shl i64 undef, undef
ret i64 %r
@@ -98,7 +99,7 @@ define i64 @test11() {
define i64 @test11b(i64 %a) {
; CHECK-LABEL: @test11b(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = shl i64 %a, undef
ret i64 %r
@@ -106,7 +107,7 @@ define i64 @test11b(i64 %a) {
define i64 @test12() {
; CHECK-LABEL: @test12(
-; CHECK: ret i64 poison
+; CHECK-NEXT: ret i64 poison
;
%r = ashr i64 undef, undef
ret i64 %r
@@ -114,7 +115,7 @@ define i64 @test12() {
define i64 @test12b(i64 %a) {
; CHECK-LABEL: @test12b(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = ashr i64 %a, undef
ret i64 %r
@@ -122,7 +123,7 @@ define i64 @test12b(i64 %a) {
define i64 @test13() {
; CHECK-LABEL: @test13(
-; CHECK: ret i64 poison
+; CHECK-NEXT: ret i64 poison
;
%r = lshr i64 undef, undef
ret i64 %r
@@ -130,7 +131,7 @@ define i64 @test13() {
define i64 @test13b(i64 %a) {
; CHECK-LABEL: @test13b(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = lshr i64 %a, undef
ret i64 %r
@@ -138,7 +139,7 @@ define i64 @test13b(i64 %a) {
define i1 @test14() {
; CHECK-LABEL: @test14(
-; CHECK: ret i1 undef
+; CHECK-NEXT: ret i1 undef
;
%r = icmp slt i64 undef, undef
ret i1 %r
@@ -146,7 +147,7 @@ define i1 @test14() {
define i1 @test15() {
; CHECK-LABEL: @test15(
-; CHECK: ret i1 undef
+; CHECK-NEXT: ret i1 undef
;
%r = icmp ult i64 undef, undef
ret i1 %r
@@ -154,7 +155,7 @@ define i1 @test15() {
define i64 @test16(i64 %a) {
; CHECK-LABEL: @test16(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = select i1 undef, i64 %a, i64 undef
ret i64 %r
@@ -162,7 +163,7 @@ define i64 @test16(i64 %a) {
define i64 @test17(i64 %a) {
; CHECK-LABEL: @test17(
-; CHECK: ret i64 undef
+; CHECK-NEXT: ret i64 undef
;
%r = select i1 undef, i64 undef, i64 %a
ret i64 %r
@@ -170,7 +171,7 @@ define i64 @test17(i64 %a) {
define i64 @test18(i64 %a) {
; CHECK-LABEL: @test18(
-; CHECK: [[R:%.*]] = call i64 undef(i64 %a)
+; CHECK-NEXT: [[R:%.*]] = call i64 undef(i64 [[A:%.*]])
; CHECK-NEXT: ret i64 undef
;
%r = call i64 (i64) undef(i64 %a)
@@ -179,7 +180,7 @@ define i64 @test18(i64 %a) {
define <4 x i8> @test19(<4 x i8> %a) {
; CHECK-LABEL: @test19(
-; CHECK: ret <4 x i8> undef
+; CHECK-NEXT: ret <4 x i8> undef
;
%b = shl <4 x i8> %a, <i8 8, i8 9, i8 undef, i8 -1>
ret <4 x i8> %b
@@ -187,7 +188,7 @@ define <4 x i8> @test19(<4 x i8> %a) {
define i32 @test20(i32 %a) {
; CHECK-LABEL: @test20(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = udiv i32 %a, 0
ret i32 %b
@@ -203,7 +204,7 @@ define <2 x i32> @test20vec(<2 x i32> %a) {
define i32 @test21(i32 %a) {
; CHECK-LABEL: @test21(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = sdiv i32 %a, 0
ret i32 %b
@@ -219,7 +220,7 @@ define <2 x i32> @test21vec(<2 x i32> %a) {
define i32 @test22(i32 %a) {
; CHECK-LABEL: @test22(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = ashr exact i32 undef, %a
ret i32 %b
@@ -227,7 +228,7 @@ define i32 @test22(i32 %a) {
define i32 @test23(i32 %a) {
; CHECK-LABEL: @test23(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = lshr exact i32 undef, %a
ret i32 %b
@@ -235,7 +236,7 @@ define i32 @test23(i32 %a) {
define i32 @test24() {
; CHECK-LABEL: @test24(
-; CHECK: ret i32 poison
+; CHECK-NEXT: ret i32 poison
;
%b = udiv i32 undef, 0
ret i32 %b
@@ -243,7 +244,7 @@ define i32 @test24() {
define i32 @test25() {
; CHECK-LABEL: @test25(
-; CHECK: ret i32 poison
+; CHECK-NEXT: ret i32 poison
;
%b = lshr i32 0, undef
ret i32 %b
@@ -251,7 +252,7 @@ define i32 @test25() {
define i32 @test26() {
; CHECK-LABEL: @test26(
-; CHECK: ret i32 poison
+; CHECK-NEXT: ret i32 poison
;
%b = ashr i32 0, undef
ret i32 %b
@@ -259,7 +260,7 @@ define i32 @test26() {
define i32 @test27() {
; CHECK-LABEL: @test27(
-; CHECK: ret i32 poison
+; CHECK-NEXT: ret i32 poison
;
%b = shl i32 0, undef
ret i32 %b
@@ -267,7 +268,7 @@ define i32 @test27() {
define i32 @test28(i32 %a) {
; CHECK-LABEL: @test28(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = shl nsw i32 undef, %a
ret i32 %b
@@ -275,7 +276,7 @@ define i32 @test28(i32 %a) {
define i32 @test29(i32 %a) {
; CHECK-LABEL: @test29(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = shl nuw i32 undef, %a
ret i32 %b
@@ -283,7 +284,7 @@ define i32 @test29(i32 %a) {
define i32 @test30(i32 %a) {
; CHECK-LABEL: @test30(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = shl nsw nuw i32 undef, %a
ret i32 %b
@@ -291,7 +292,7 @@ define i32 @test30(i32 %a) {
define i32 @test31(i32 %a) {
; CHECK-LABEL: @test31(
-; CHECK: ret i32 0
+; CHECK-NEXT: ret i32 0
;
%b = shl i32 undef, %a
ret i32 %b
@@ -299,7 +300,7 @@ define i32 @test31(i32 %a) {
define i32 @test32(i32 %a) {
; CHECK-LABEL: @test32(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = shl i32 undef, 0
ret i32 %b
@@ -307,7 +308,7 @@ define i32 @test32(i32 %a) {
define i32 @test33(i32 %a) {
; CHECK-LABEL: @test33(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = ashr i32 undef, 0
ret i32 %b
@@ -315,7 +316,7 @@ define i32 @test33(i32 %a) {
define i32 @test34(i32 %a) {
; CHECK-LABEL: @test34(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = lshr i32 undef, 0
ret i32 %b
@@ -323,7 +324,7 @@ define i32 @test34(i32 %a) {
define i32 @test35(<4 x i32> %V) {
; CHECK-LABEL: @test35(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = extractelement <4 x i32> %V, i32 4
ret i32 %b
@@ -331,7 +332,7 @@ define i32 @test35(<4 x i32> %V) {
define i32 @test36(i32 %V) {
; CHECK-LABEL: @test36(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = extractelement <4 x i32> undef, i32 %V
ret i32 %b
@@ -339,7 +340,7 @@ define i32 @test36(i32 %V) {
define i32 @test37() {
; CHECK-LABEL: @test37(
-; CHECK: ret i32 poison
+; CHECK-NEXT: ret i32 poison
;
%b = udiv i32 undef, undef
ret i32 %b
@@ -347,7 +348,7 @@ define i32 @test37() {
define i32 @test38(i32 %a) {
; CHECK-LABEL: @test38(
-; CHECK: ret i32 undef
+; CHECK-NEXT: ret i32 undef
;
%b = udiv i32 %a, undef
ret i32 %b
@@ -355,7 +356,7 @@ define i32 @test38(i32 %a) {
define i32 @test39() {
; CHECK-LABEL: @test39(
-; CHECK: ret i32 poison
+; CHECK-NEXT: ret i32 poison
;
%b = udiv i32 0, undef
ret i32 %b
More information about the llvm-commits
mailing list