[llvm-commits] [llvm] r140001 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/2011-09-18-sse2cmp.ll

Nadav Rotem nadav.rotem at intel.com
Sun Sep 18 07:57:04 PDT 2011


Author: nadav
Date: Sun Sep 18 09:57:03 2011
New Revision: 140001

URL: http://llvm.org/viewvc/llvm-project?rev=140001&view=rev
Log:
setOperationAction should be done on the return value of the type, not the operands. 


Added:
    llvm/trunk/test/CodeGen/X86/2011-09-18-sse2cmp.ll
Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=140001&r1=140000&r2=140001&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Sep 18 09:57:03 2011
@@ -821,7 +821,7 @@
     setOperationAction(ISD::FSQRT,              MVT::v2f64, Legal);
     setOperationAction(ISD::FNEG,               MVT::v2f64, Custom);
 
-    setOperationAction(ISD::SETCC,              MVT::v2f64, Custom);
+    setOperationAction(ISD::SETCC,              MVT::v2i64, Custom);
     setOperationAction(ISD::SETCC,              MVT::v16i8, Custom);
     setOperationAction(ISD::SETCC,              MVT::v8i16, Custom);
     setOperationAction(ISD::SETCC,              MVT::v4i32, Custom);

Added: llvm/trunk/test/CodeGen/X86/2011-09-18-sse2cmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2011-09-18-sse2cmp.ll?rev=140001&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2011-09-18-sse2cmp.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2011-09-18-sse2cmp.ll Sun Sep 18 09:57:03 2011
@@ -0,0 +1,12 @@
+;RUN: llc < %s -march=x86 -mcpu=yonah -promote-elements -mattr=+sse2,-sse41 | FileCheck %s
+
+;CHECK: @max
+;CHECK: cmplepd
+;CHECK: ret
+
+define <2 x double> @max(<2 x double> %x, <2 x double> %y) {
+   %max_is_x = fcmp oge <2 x double> %x, %y
+   %max = select <2 x i1> %max_is_x, <2 x double> %x, <2 x double> %y
+   ret <2 x double> %max
+}
+





More information about the llvm-commits mailing list