aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-30 22:36:52 +0000
committerChris Lattner <sabre@nondot.org>2004-03-30 22:36:52 +0000
commit5192676aa48dca878f035c20ddc03d7e3cbeb03b (patch)
tree9dba3211e7d38bca422ba0e86d075377b82de63a /test
parent87d3bb5dfa9b705952c89ca6e0dca251368a9457 (diff)
downloadexternal_llvm-5192676aa48dca878f035c20ddc03d7e3cbeb03b.zip
external_llvm-5192676aa48dca878f035c20ddc03d7e3cbeb03b.tar.gz
external_llvm-5192676aa48dca878f035c20ddc03d7e3cbeb03b.tar.bz2
New testcase. This now codegens to:
max: mov %EAX, DWORD PTR [%ESP + 4] mov %ECX, DWORD PTR [%ESP + 8] cmp %EAX, %ECX cmovle %EAX, %ECX ret Someone should really implement passing arguments through registers for known-internal functions. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/2004-03-30-Select-Max.llx7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2004-03-30-Select-Max.llx b/test/CodeGen/X86/2004-03-30-Select-Max.llx
new file mode 100644
index 0000000..292762a
--- /dev/null
+++ b/test/CodeGen/X86/2004-03-30-Select-Max.llx
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | llc -march=x86 | not grep 'j[lgbe]'
+
+int %max(int %A, int %B) {
+ %gt = setgt int %A, %B
+ %R = select bool %gt, int %A, int %B
+ ret int %R
+}