diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2017-12-08 18:35:51 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2017-12-08 18:35:51 +0000 |
| commit | d4468912b0912c6fb08dc51d05e5a32aecbb7287 (patch) | |
| tree | 398ad0ca89a9f74658dae8e6c6506e6d0bc9cd97 /llvm/lib | |
| parent | 8e39dc36b836ae0a196e1cc6c712f0c494f65a9c (diff) | |
| download | bcm5719-llvm-d4468912b0912c6fb08dc51d05e5a32aecbb7287.tar.gz bcm5719-llvm-d4468912b0912c6fb08dc51d05e5a32aecbb7287.zip | |
[x86] use hasAVX2() rather than hasInt256(); NFC
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.
llvm-svn: 320170
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 348ad379079..f31398c10a3 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -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 |

