summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/crash-nosse.ll
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-26 23:00:24 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-26 23:00:24 +0000
commite4709777e38b58b856cf8395e071a3326d50a402 (patch)
tree165495c1b503ea60a45b5f10085092c680f67eb2 /test/CodeGen/X86/crash-nosse.ll
parent25ad78332282cded86938d556d4ee2384158b671 (diff)
downloadllvm-e4709777e38b58b856cf8395e071a3326d50a402.tar.gz
llvm-e4709777e38b58b856cf8395e071a3326d50a402.tar.bz2
llvm-e4709777e38b58b856cf8395e071a3326d50a402.tar.xz
Eliminate copies of undefined values during coalescing.
These copies would coalesce easily, but the resulting value would be defined by a deleted instruction. Now we also remove the undefined value number from the destination register. This fixes PR10503. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/crash-nosse.ll')
-rw-r--r--test/CodeGen/X86/crash-nosse.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/CodeGen/X86/crash-nosse.ll b/test/CodeGen/X86/crash-nosse.ll
new file mode 100644
index 0000000000..1cec25b334
--- /dev/null
+++ b/test/CodeGen/X86/crash-nosse.ll
@@ -0,0 +1,27 @@
+; RUN: llc < %s -mattr=-sse2,-sse41 -verify-machineinstrs
+target triple = "x86_64-unknown-linux-gnu"
+
+; PR10503
+; This test case produces INSERT_SUBREG 0, <undef> instructions that
+; ProcessImplicitDefs doesn't eliminate.
+define void @autogen_136178_500() {
+BB:
+ %Shuff6 = shufflevector <32 x i32> undef, <32 x i32> undef, <32 x i32> <i32 27, i32 29, i32 31, i32 undef, i32 undef, i32 37, i32 39, i32 41, i32 undef, i32 45, i32 47, i32 49, i32 51, i32 53, i32 55, i32 57, i32 undef, i32 61, i32 63, i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 undef, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25>
+ %S17 = select i1 true, <8 x float>* null, <8 x float>* null
+ br label %CF
+
+CF: ; preds = %CF, %BB
+ %L19 = load <8 x float>* %S17
+ %BC = bitcast <32 x i32> %Shuff6 to <32 x float>
+ %S28 = fcmp ord double 0x3ED1A1F787BB2185, 0x3EE59DE55A8DF890
+ br i1 %S28, label %CF, label %CF39
+
+CF39: ; preds = %CF39, %CF
+ store <8 x float> %L19, <8 x float>* %S17
+ %I35 = insertelement <32 x float> %BC, float 0x3EC2489F60000000, i32 9
+ %S38 = fcmp ule double 0x3EE59DE55A8DF890, 0x3EC4AB0CBB986A1A
+ br i1 %S38, label %CF39, label %CF40
+
+CF40: ; preds = %CF39
+ ret void
+}