[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/2004-03-30-Select-Max.llx

Chris Lattner lattner at cs.uiuc.edu
Tue Mar 30 16:38:04 PST 2004


Changes in directory llvm/test/Regression/CodeGen/X86:

2004-03-30-Select-Max.llx added (r1.1)

---
Log message:

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.  :)



---
Diffs of the changes:  (+7 -0)

Index: llvm/test/Regression/CodeGen/X86/2004-03-30-Select-Max.llx
diff -c /dev/null llvm/test/Regression/CodeGen/X86/2004-03-30-Select-Max.llx:1.1
*** /dev/null	Tue Mar 30 16:37:33 2004
--- llvm/test/Regression/CodeGen/X86/2004-03-30-Select-Max.llx	Tue Mar 30 16:36:52 2004
***************
*** 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
+ }





More information about the llvm-commits mailing list