aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-02-11 08:30:52 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-02-11 08:30:52 +0000
commit431bfcbe3746d1a427b4c7791140f88882a8e8d8 (patch)
treea212e655729bcdd134fefebcbab1e4a850431c0a /test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll
parent786cb7e44639db56c2d5cd40279778ede2fc005c (diff)
downloadexternal_llvm-431bfcbe3746d1a427b4c7791140f88882a8e8d8.zip
external_llvm-431bfcbe3746d1a427b4c7791140f88882a8e8d8.tar.gz
external_llvm-431bfcbe3746d1a427b4c7791140f88882a8e8d8.tar.bz2
Determine whether a spill kills the register it's spilling before insertion rather than trying to undo the kill marker afterwards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll')
-rw-r--r--test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll b/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll
new file mode 100644
index 0000000..5edf6b7
--- /dev/null
+++ b/test/CodeGen/PowerPC/2008-02-09-LocalRegAllocAssert.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as < %s | llc -mtriple=powerpc-apple-darwin -regalloc=local
+
+define i32 @bork(i64 %foo, i64 %bar) {
+entry:
+ %tmp = load i64* null, align 8 ; <i64> [#uses=2]
+ %tmp2 = icmp ule i64 %tmp, 0 ; <i1> [#uses=1]
+ %min = select i1 %tmp2, i64 %tmp, i64 0 ; <i64> [#uses=1]
+ store i64 %min, i64* null, align 8
+ ret i32 0
+}