aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/coalescer-commute5.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-10 08:11:32 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-10 08:11:32 +0000
commit4ff3f1cc573594058a98ffa8f198a81739c523b1 (patch)
treefd0059312aefd7ea642ea5adb856429f8e590c1f /test/CodeGen/X86/coalescer-commute5.ll
parentff247d2ed41dac50d99c5ff534b12f33bb57310a (diff)
downloadexternal_llvm-4ff3f1cc573594058a98ffa8f198a81739c523b1.zip
external_llvm-4ff3f1cc573594058a98ffa8f198a81739c523b1.tar.gz
external_llvm-4ff3f1cc573594058a98ffa8f198a81739c523b1.tar.bz2
- Fix a subtle bug in RemoveCopyByCommutingDef. ALR is the live range where the source is defined; BLR is the live range which is defined by the copy.
If ALR and BLR overlaps and end of BLR extends beyond end of ALR, e.g. A = or A, B ... B = A ... C = A<kill> ... = B then do not add kills of A to the newly created B interval. - Also fix some kill info update bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48141 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/coalescer-commute5.ll')
-rw-r--r--test/CodeGen/X86/coalescer-commute5.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/X86/coalescer-commute5.ll b/test/CodeGen/X86/coalescer-commute5.ll
new file mode 100644
index 0000000..c730ea7
--- /dev/null
+++ b/test/CodeGen/X86/coalescer-commute5.ll
@@ -0,0 +1,21 @@
+; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin -mattr=+sse2 | not grep movaps
+
+define i32 @t() {
+entry:
+ br i1 true, label %bb1664, label %bb1656
+bb1656: ; preds = %entry
+ ret i32 0
+bb1664: ; preds = %entry
+ %tmp4297 = bitcast <16 x i8> zeroinitializer to <2 x i64> ; <<2 x i64>> [#uses=2]
+ %tmp4351 = call <16 x i8> @llvm.x86.sse2.pcmpeq.b( <16 x i8> zeroinitializer, <16 x i8> zeroinitializer ) nounwind readnone ; <<16 x i8>> [#uses=0]
+ br i1 false, label %bb5310, label %bb4743
+bb4743: ; preds = %bb1664
+ %tmp4360.not28 = or <2 x i64> zeroinitializer, %tmp4297 ; <<2 x i64>> [#uses=1]
+ br label %bb5310
+bb5310: ; preds = %bb4743, %bb1664
+ %tmp4360.not28.pn = phi <2 x i64> [ %tmp4360.not28, %bb4743 ], [ %tmp4297, %bb1664 ] ; <<2 x i64>> [#uses=1]
+ %tmp4415.not.pn = or <2 x i64> zeroinitializer, %tmp4360.not28.pn ; <<2 x i64>> [#uses=0]
+ ret i32 0
+}
+
+declare <16 x i8> @llvm.x86.sse2.pcmpeq.b(<16 x i8>, <16 x i8>) nounwind readnone