]> granicus.if.org Git - llvm/commitdiff
[x86] use hasAVX2() rather than hasInt256(); NFC
authorSanjay Patel <spatel@rotateright.com>
Fri, 8 Dec 2017 18:35:51 +0000 (18:35 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 8 Dec 2017 18:35:51 +0000 (18:35 +0000)
These are aliases, but the thing we're checking here is that the target has
vpsllv*, not that the data type is 256-bit. Those instructions exist for
128-bit vectors too...but sadly, not for all element sizes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320170 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 348ad379079dfca50d2d91935d225e11bc877915..f31398c10a34f1e6f97406254e4394fadf68d791 100644 (file)
@@ -25356,9 +25356,9 @@ bool X86TargetLowering::isVectorShiftByScalarCheap(Type *Ty) const {
   if (Bits == 8)
     return false;
 
-  // On AVX2 there are new vpsllv[dq] instructions (and other shifts), that make
-  // variable shifts just as cheap as scalar ones.
-  if (Subtarget.hasInt256() && (Bits == 32 || Bits == 64))
+  // AVX2 has vpsllv[dq] instructions (and other shifts) that make variable
+  // shifts just as cheap as scalar ones.
+  if (Subtarget.hasAVX2() && (Bits == 32 || Bits == 64))
     return false;
 
   // Otherwise, it's significantly cheaper to shift by a scalar amount than by a