mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 03:53:04 +02:00
Fix typo in PerformAddCombine that caused any vector type to be checked for horizontal add/sub if AVX2 is enabled. This caused an assert to fail for non 128/256-bit vectors when done before type legalizing. Fixes PR11749.
llvm-svn: 148096
This commit is contained in:
parent
9ba097a208
commit
32812741b7
@ -14575,7 +14575,7 @@ static SDValue PerformAddCombine(SDNode *N, SelectionDAG &DAG,
|
||||
|
||||
// Try to synthesize horizontal adds from adds of shuffles.
|
||||
if (((Subtarget->hasSSSE3() && (VT == MVT::v8i16 || VT == MVT::v4i32)) ||
|
||||
(Subtarget->hasAVX2() && (VT == MVT::v16i16 || MVT::v8i32))) &&
|
||||
(Subtarget->hasAVX2() && (VT == MVT::v16i16 || VT == MVT::v8i32))) &&
|
||||
isHorizontalBinOp(Op0, Op1, true))
|
||||
return DAG.getNode(X86ISD::HADD, N->getDebugLoc(), VT, Op0, Op1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user