[llvm] 483a4b2 - [SelectionDAG] Add test for PR49839 (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 06:07:02 PDT 2022
Author: Nikita Popov
Date: 2022-06-13T15:06:53+02:00
New Revision: 483a4b22267b813bbda03d805034df45d0a87c21
URL: https://github.com/llvm/llvm-project/commit/483a4b22267b813bbda03d805034df45d0a87c21
DIFF: https://github.com/llvm/llvm-project/commit/483a4b22267b813bbda03d805034df45d0a87c21.diff
LOG: [SelectionDAG] Add test for PR49839 (NFC)
Added:
llvm/test/CodeGen/X86/pr49839-trapping-aggregate.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/pr49839-trapping-aggregate.ll b/llvm/test/CodeGen/X86/pr49839-trapping-aggregate.ll
new file mode 100644
index 000000000000..7b606acc9227
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr49839-trapping-aggregate.ll
@@ -0,0 +1,33 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=x86_64-- < %s | FileCheck %s
+
+ at g = global i32 0
+
+define <1 x i64> @trapping_const_agg(i1 %c, i1 %c2) {
+; CHECK-LABEL: trapping_const_agg:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: testb $1, %dil
+; CHECK-NEXT: je .LBB0_4
+; CHECK-NEXT: # %bb.1: # %if
+; CHECK-NEXT: movl $1, %eax
+; CHECK-NEXT: xorl %edx, %edx
+; CHECK-NEXT: idivq g at GOTPCREL(%rip)
+; CHECK-NEXT: testb $1, %sil
+; CHECK-NEXT: je .LBB0_4
+; CHECK-NEXT: # %bb.2:
+; CHECK-NEXT: movq %rdx, %rax
+; CHECK-NEXT: retq
+; CHECK-NEXT: .LBB0_4: # %end2
+; CHECK-NEXT: xorl %eax, %eax
+; CHECK-NEXT: retq
+entry:
+ br i1 %c, label %if, label %end
+if:
+ br i1 %c2, label %end, label %end2
+end:
+ %phi = phi <1 x i64> [ zeroinitializer, %entry ], [ <i64 srem (i64 1, i64 ptrtoint (i32* @g to i64))>, %if ]
+ ret <1 x i64> %phi
+
+end2:
+ ret <1 x i64> zeroinitializer
+}
More information about the llvm-commits
mailing list