diff options
| author | Michael Kuperstein <mkuper@google.com> | 2016-08-25 17:17:46 +0000 |
|---|---|---|
| committer | Michael Kuperstein <mkuper@google.com> | 2016-08-25 17:17:46 +0000 |
| commit | 40887c5566253d701168c58b2922651fe0c96224 (patch) | |
| tree | 3af7020210005ce48f11a7f1ccbc60037a62809a /llvm/lib/Target | |
| parent | 6080bdbec370d0d1f4202ce2d21e1ed4b090c6ff (diff) | |
| download | bcm5719-llvm-40887c5566253d701168c58b2922651fe0c96224.tar.gz bcm5719-llvm-40887c5566253d701168c58b2922651fe0c96224.zip | |
[X86] 512-bit VPAVG requires AVX512BW
Fix VPAVG detection to require AVX512BW, not AVX512F for 512-bit widths,
and change associated asserts to assert in the right direction...
This fixes PR29111.
llvm-svn: 279755
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index fe9d1638cb1..d92ebb9b714 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -22170,9 +22170,9 @@ void X86TargetLowering::ReplaceNodeResults(SDNode *N, auto InVTSize = InVT.getSizeInBits(); const unsigned RegSize = (InVTSize > 128) ? ((InVTSize > 256) ? 512 : 256) : 128; - assert((!Subtarget.hasAVX512() || RegSize < 512) && - "512-bit vector requires AVX512"); - assert((!Subtarget.hasAVX2() || RegSize < 256) && + assert((Subtarget.hasBWI() || RegSize < 512) && + "512-bit vector requires AVX512BW"); + assert((Subtarget.hasAVX2() || RegSize < 256) && "256-bit vector requires AVX2"); auto ElemVT = InVT.getVectorElementType(); @@ -29233,7 +29233,7 @@ static SDValue detectAVGPattern(SDValue In, EVT VT, SelectionDAG &DAG, if (!Subtarget.hasSSE2()) return SDValue(); - if (Subtarget.hasAVX512()) { + if (Subtarget.hasBWI()) { if (VT.getSizeInBits() > 512) return SDValue(); } else if (Subtarget.hasAVX2()) { |

