summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/2009-08-04-RegScavengerAssert.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-08-04 16:52:44 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-08-04 16:52:44 +0000
commit7d35249e897dc655c7c884b83d5cb39478ae497c (patch)
treec47df1f086b455b2889aa902e1032f880457bfe2 /test/CodeGen/ARM/2009-08-04-RegScavengerAssert.ll
parent7145e9be64cfec9e74267816bfac05cc3248ec85 (diff)
downloadllvm-7d35249e897dc655c7c884b83d5cb39478ae497c.tar.gz
llvm-7d35249e897dc655c7c884b83d5cb39478ae497c.tar.bz2
llvm-7d35249e897dc655c7c884b83d5cb39478ae497c.tar.xz
Fix PR4528. This scavenger assertion is too strict. The two-address value is
killed by another operand. There is probably a better fix. Either 1) scavenger can look at other operands, or 2) livevariables can be smarter about kill markers. Patches welcome. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/2009-08-04-RegScavengerAssert.ll')
-rw-r--r--test/CodeGen/ARM/2009-08-04-RegScavengerAssert.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/2009-08-04-RegScavengerAssert.ll b/test/CodeGen/ARM/2009-08-04-RegScavengerAssert.ll
new file mode 100644
index 0000000000..cb274738da
--- /dev/null
+++ b/test/CodeGen/ARM/2009-08-04-RegScavengerAssert.ll
@@ -0,0 +1,25 @@
+; RUN: llvm-as < %s | llc -mtriple=armv6-elf
+; PR4528
+
+define arm_aapcscc i32 @file_read_actor(i32 %desc, i32 %page, i32 %offset, i32 %size) nounwind optsize {
+entry:
+ br i1 undef, label %fault_in_pages_writeable.exit, label %bb5.i
+
+bb5.i: ; preds = %entry
+ %asmtmp.i = tail call i32 asm sideeffect "1:\09strbt\09$1,[$2]\0A2:\0A\09.section .fixup,\22ax\22\0A\09.align\092\0A3:\09mov\09$0, $3\0A\09b\092b\0A\09.previous\0A\09.section __ex_table,\22a\22\0A\09.align\093\0A\09.long\091b, 3b\0A\09.previous", "=r,r,r,i,0,~{cc}"(i8 0, i32 undef, i32 -14, i32 0) nounwind ; <i32> [#uses=1]
+ br label %fault_in_pages_writeable.exit
+
+fault_in_pages_writeable.exit: ; preds = %bb5.i, %entry
+ %0 = phi i32 [ 0, %entry ], [ %asmtmp.i, %bb5.i ] ; <i32> [#uses=1]
+ %1 = icmp eq i32 %0, 0 ; <i1> [#uses=1]
+ br i1 %1, label %bb2, label %bb3
+
+bb2: ; preds = %fault_in_pages_writeable.exit
+ unreachable
+
+bb3: ; preds = %fault_in_pages_writeable.exit
+ %2 = tail call arm_aapcscc i32 @__copy_to_user(i8* undef, i8* undef, i32 undef) nounwind ; <i32> [#uses=0]
+ unreachable
+}
+
+declare arm_aapcscc i32 @__copy_to_user(i8*, i8*, i32)