[llvm] abefed6 - [SimplifyCFG] Add test for PR49839 (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 05:35:38 PDT 2022
Author: Nikita Popov
Date: 2022-06-13T14:35:09+02:00
New Revision: abefed6f970a4dd6161ce8306399207a624d6a26
URL: https://github.com/llvm/llvm-project/commit/abefed6f970a4dd6161ce8306399207a624d6a26
DIFF: https://github.com/llvm/llvm-project/commit/abefed6f970a4dd6161ce8306399207a624d6a26.diff
LOG: [SimplifyCFG] Add test for PR49839 (NFC)
Added:
Modified:
llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll b/llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll
index dad877f98c91c..6d827ef9ccc43 100644
--- a/llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll
+++ b/llvm/test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll
@@ -66,3 +66,22 @@ bb9:
bb10:
ret i32 927
}
+
+ at g = external global i32
+
+define <1 x i64> @trapping_const_agg(i1 %c) {
+; CHECK-LABEL: @trapping_const_agg(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[SPEC_SELECT:%.*]] = select i1 [[C:%.*]], <1 x i64> <i64 srem (i64 1, i64 ptrtoint (i32* @g to i64))>, <1 x i64> zeroinitializer
+; CHECK-NEXT: ret <1 x i64> [[SPEC_SELECT]]
+;
+entry:
+ br i1 %c, label %if, label %end
+
+if:
+ br label %end
+
+end:
+ %phi = phi <1 x i64> [ zeroinitializer, %entry ], [ <i64 srem (i64 1, i64 ptrtoint (i32* @g to i64))>, %if ]
+ ret <1 x i64> %phi
+}
More information about the llvm-commits
mailing list