summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-30 21:02:51 +0000
committerChris Lattner <sabre@nondot.org>2005-08-30 21:02:51 +0000
commit353f1dea504193cf7a6d4afbe2f316434c6731e0 (patch)
treec7a758ad0eacb910a0322a206b3cbe29ede12daa /test
parentdd43c866c86f3d920f9e94a1ecdcfc80be01b2ab (diff)
downloadexternal_llvm-353f1dea504193cf7a6d4afbe2f316434c6731e0.zip
external_llvm-353f1dea504193cf7a6d4afbe2f316434c6731e0.tar.gz
external_llvm-353f1dea504193cf7a6d4afbe2f316434c6731e0.tar.bz2
new testcase corresponding to PR621
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/2005-08-30-RegAllocAliasProblem.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2005-08-30-RegAllocAliasProblem.ll b/test/CodeGen/X86/2005-08-30-RegAllocAliasProblem.ll
new file mode 100644
index 0000000..509c07b
--- /dev/null
+++ b/test/CodeGen/X86/2005-08-30-RegAllocAliasProblem.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep 'test.*%AL' || \
+; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep 'cmove.*%EAX'
+
+; This testcase was compiling to:
+;
+; _pypy_simple5:
+; movl $13, %ecx
+; movl $12, %eax
+; movb 4(%esp), %al
+; testb %al, %al ;; clobber EAX!
+; cmove %ecx, %eax
+; ret
+
+int %pypy_simple5(bool %b_4787) {
+ %retval = select bool %b_4787, int 12, int 13 ; <int> [#uses=1]
+ ret int %retval
+}