summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/2008-03-25-TwoAddrPassBug.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-27 01:27:25 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-27 01:27:25 +0000
commit7a963fa8ee2ad90ef456e36c116c046bf2ba8199 (patch)
tree75cfeea971085bbc3aaceee24f92d01725f397f2 /test/CodeGen/X86/2008-03-25-TwoAddrPassBug.ll
parent7c1483bc6f009318ce66c4d37d1ba930e01a6d13 (diff)
downloadllvm-7a963fa8ee2ad90ef456e36c116c046bf2ba8199.tar.gz
llvm-7a963fa8ee2ad90ef456e36c116c046bf2ba8199.tar.bz2
llvm-7a963fa8ee2ad90ef456e36c116c046bf2ba8199.tar.xz
Fix a memory bug: increment an iterator of a deleted machine instr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2008-03-25-TwoAddrPassBug.ll')
-rw-r--r--test/CodeGen/X86/2008-03-25-TwoAddrPassBug.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2008-03-25-TwoAddrPassBug.ll b/test/CodeGen/X86/2008-03-25-TwoAddrPassBug.ll
new file mode 100644
index 0000000000..1e5ab99a9c
--- /dev/null
+++ b/test/CodeGen/X86/2008-03-25-TwoAddrPassBug.ll
@@ -0,0 +1,24 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2
+
+define void @t() {
+entry:
+ %tmp455 = shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> < i32 1, i32 0, i32 3, i32 2 > ; <<4 x float>> [#uses=1]
+ %tmp457 = mul <4 x float> zeroinitializer, %tmp455 ; <<4 x float>> [#uses=2]
+ %tmp461 = shufflevector <4 x float> %tmp457, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>> [#uses=1]
+ %tmp465 = shufflevector <4 x float> %tmp457, <4 x float> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 > ; <<4 x float>> [#uses=1]
+ %tmp466 = sub <4 x float> %tmp461, %tmp465 ; <<4 x float>> [#uses=1]
+ %tmp536 = shufflevector <4 x float> zeroinitializer, <4 x float> %tmp466, <4 x i32> < i32 0, i32 4, i32 1, i32 5 > ; <<4 x float>> [#uses=1]
+ %tmp542 = shufflevector <4 x float> %tmp536, <4 x float> zeroinitializer, <4 x i32> < i32 6, i32 7, i32 2, i32 3 > ; <<4 x float>> [#uses=1]
+ %tmp580 = bitcast <4 x float> %tmp542 to <4 x i32> ; <<4 x i32>> [#uses=1]
+ %tmp582 = and <4 x i32> %tmp580, zeroinitializer ; <<4 x i32>> [#uses=1]
+ %tmp591 = or <4 x i32> %tmp582, zeroinitializer ; <<4 x i32>> [#uses=1]
+ %tmp592 = bitcast <4 x i32> %tmp591 to <4 x float> ; <<4 x float>> [#uses=1]
+ %tmp609 = fdiv <4 x float> < float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00 >, %tmp592 ; <<4 x float>> [#uses=1]
+ %tmp652 = shufflevector <4 x float> %tmp609, <4 x float> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x float>> [#uses=1]
+ %tmp662 = mul <4 x float> zeroinitializer, %tmp652 ; <<4 x float>> [#uses=1]
+ %tmp678 = shufflevector <4 x float> %tmp662, <4 x float> undef, <4 x i32> < i32 1, i32 1, i32 1, i32 1 > ; <<4 x float>> [#uses=1]
+ %tmp753 = mul <4 x float> zeroinitializer, %tmp678 ; <<4 x float>> [#uses=1]
+ %tmp754 = sub <4 x float> zeroinitializer, %tmp753 ; <<4 x float>> [#uses=1]
+ store <4 x float> %tmp754, <4 x float>* null, align 16
+ unreachable
+}