[llvm] r212300 - [x86] Clarify that this lowering only applies to vectors and is only

Chandler Carruth chandlerc at gmail.com
Thu Jul 3 15:57:44 PDT 2014


Author: chandlerc
Date: Thu Jul  3 17:57:44 2014
New Revision: 212300

URL: http://llvm.org/viewvc/llvm-project?rev=212300&view=rev
Log:
[x86] Clarify that this lowering only applies to vectors and is only
used when we have SSE2.

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=212300&r1=212299&r2=212300&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Jul  3 17:57:44 2014
@@ -15481,15 +15481,14 @@ static SDValue LowerScalarVariableShift(
 
 static SDValue LowerShift(SDValue Op, const X86Subtarget* Subtarget,
                           SelectionDAG &DAG) {
-
   MVT VT = Op.getSimpleValueType();
   SDLoc dl(Op);
   SDValue R = Op.getOperand(0);
   SDValue Amt = Op.getOperand(1);
   SDValue V;
 
-  if (!Subtarget->hasSSE2())
-    return SDValue();
+  assert(VT.isVector() && "Custom lowering only for vector shifts!");
+  assert(Subtarget->hasSSE2() && "Only custom lower when we have SSE2!");
 
   V = LowerScalarImmediateShift(Op, DAG, Subtarget);
   if (V.getNode())





More information about the llvm-commits mailing list