[llvm-commits] [llvm] r163064 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp test/CodeGen/X86/vec_select.ll

Pete Cooper peter_cooper at apple.com
Sat Sep 1 10:37:55 PDT 2012


Author: pete
Date: Sat Sep  1 12:37:55 2012
New Revision: 163064

URL: http://llvm.org/viewvc/llvm-project?rev=163064&view=rev
Log:
Revert "Take account of boolean vector contents when promoting a build vector from i1 to some other type.  rdar://problem/12210060"

This reverts commit 5dd9e214fb92847e947f9edab170f9b4e52b908f.

Thanks to Duncan for explaining how this should have been done.

Conflicts:

	test/CodeGen/X86/vec_select.ll

Removed:
    llvm/trunk/test/CodeGen/X86/vec_select.ll
Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp?rev=163064&r1=163063&r2=163064&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Sat Sep  1 12:37:55 2012
@@ -2913,24 +2913,8 @@
 
   SmallVector<SDValue, 8> Ops;
   Ops.reserve(NumElems);
-  unsigned ExtendOp = ISD::ANY_EXTEND;
-  // Extending boolean constants needs to consider the
-  // value boolean vector constants take on this target and extend
-  // with sign or zeros appropriately.
-  if (OutVT.getVectorElementType() == MVT::i1) {
-    switch (TLI.getBooleanContents(true)) {
-      case TargetLowering::UndefinedBooleanContent:
-        break;
-      case TargetLowering::ZeroOrOneBooleanContent:
-      ExtendOp = ISD::ZERO_EXTEND;
-        break;
-      case TargetLowering::ZeroOrNegativeOneBooleanContent:
-        ExtendOp = ISD::SIGN_EXTEND;
-        break;
-    }
-  }
   for (unsigned i = 0; i != NumElems; ++i) {
-    SDValue Op = DAG.getNode(ExtendOp, dl, NOutVTElem, N->getOperand(i));
+    SDValue Op = DAG.getNode(ISD::ANY_EXTEND, dl, NOutVTElem, N->getOperand(i));
     Ops.push_back(Op);
   }
 

Removed: llvm/trunk/test/CodeGen/X86/vec_select.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_select.ll?rev=163063&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec_select.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vec_select.ll (removed)
@@ -1,16 +0,0 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s
-
-; When legalizing the v4i1 constant, we need to consider the boolean contents
-; For x86 a boolean vector constant is all ones so the constants in memory
-; will be ~0U not 1.
-
-; CHECK: .long	4294967295
-; CHECK: .long	4294967295
-; CHECK: .long	0
-; CHECK: .long	0
-
-; CHECK: test
-define <4 x i8> @test(<4 x i8> %a, <4 x i8> %b) {
-  %sel = select <4 x i1> <i1 true, i1 true, i1 false, i1 false>, <4 x i8> %a, <4 x i8> %b
-	ret <4 x i8> %sel
-}





More information about the llvm-commits mailing list