Revert the wrong part of r139528, and fix testcases.
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Mon, 12 Sep 2011 21:24:07 +0000 (21:24 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Mon, 12 Sep 2011 21:24:07 +0000 (21:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139541 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx-blend.ll
test/CodeGen/X86/sse41-blend.ll

index f211c7260f82ae828fdab13492f3b47a40c95063..efbc2ee7dd83728e105ca4170c36a7d6234b4ce9 100644 (file)
@@ -8458,12 +8458,12 @@ SDValue X86TargetLowering::LowerVSETCC(SDValue Op, SelectionDAG &DAG) const {
     default: break;
     case ISD::SETOEQ:
     case ISD::SETEQ:  SSECC = 0; break;
-    case ISD::SETOGE:
-    case ISD::SETGE: Swap = true; // Fallthrough
-    case ISD::SETLT:
-    case ISD::SETOLT: SSECC = 1; break;
     case ISD::SETOGT:
     case ISD::SETGT: Swap = true; // Fallthrough
+    case ISD::SETLT:
+    case ISD::SETOLT: SSECC = 1; break;
+    case ISD::SETOGE:
+    case ISD::SETGE: Swap = true; // Fallthrough
     case ISD::SETLE:
     case ISD::SETOLE: SSECC = 2; break;
     case ISD::SETUO:  SSECC = 3; break;
index e3008d9e165c2122359a8c80253e34bf943ec7e7..71727827b3d58bdc8a0564c5a0dd898e89ba16f7 100644 (file)
@@ -85,7 +85,7 @@ define <8 x i64> @vsel_i648(<8 x i64> %v1, <8 x i64> %v2) {
 ;; TEST blend + compares
 ; CHECK: A
 define <2 x double> @A(<2 x double> %x, <2 x double> %y) {
-  ; CHECK: vcmpltpd
+  ; CHECK: vcmplepd
   ; CHECK: vblendvpd
   %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
@@ -94,7 +94,7 @@ define <2 x double> @A(<2 x double> %x, <2 x double> %y) {
 
 ; CHECK: B
 define <2 x double> @B(<2 x double> %x, <2 x double> %y) {
-  ; CHECK: vcmplepd
+  ; CHECK: vcmpltpd
   ; CHECK: vblendvpd
   %max_is_x = fcmp ogt <2 x double> %x, %y
   %max = select <2 x i1> %max_is_x, <2 x double> %x, <2 x double> %y
index aba2c129e3af4e9db1a09842f143d8d1b5f7ac65..ebbcdfae47d15bae42766dd91a43c5aea58847b7 100644 (file)
@@ -47,7 +47,7 @@ define <16 x i8> @vsel_i8(<16 x i8> %v1, <16 x i8> %v2) {
 ;; TEST blend + compares
 ; CHECK: A
 define <2 x double> @A(<2 x double> %x, <2 x double> %y) {
-  ; CHECK: cmpltpd
+  ; CHECK: cmplepd
   ; CHECK: blendvpd
   %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
@@ -56,7 +56,7 @@ define <2 x double> @A(<2 x double> %x, <2 x double> %y) {
 
 ; CHECK: B
 define <2 x double> @B(<2 x double> %x, <2 x double> %y) {
-  ; CHECK: cmplepd
+  ; CHECK: cmpltpd
   ; CHECK: blendvpd
   %max_is_x = fcmp ogt <2 x double> %x, %y
   %max = select <2 x i1> %max_is_x, <2 x double> %x, <2 x double> %y