[X86] Add an early out to combineLoopMAddPattern and combineLoopSADPattern when SSE2 is disabled.

Without this the madd.ll and sad.ll test cases both throw assertions if you run them with SSE2 disabled.

llvm-svn: 311872
This commit is contained in:
Craig Topper 2017-08-28 04:29:08 +00:00
parent 66faaceeb1
commit 2c77011d15
1 changed files with 6 additions and 0 deletions

View File

@ -35230,6 +35230,9 @@ static SDValue combineAddOrSubToADCOrSBB(SDNode *N, SelectionDAG &DAG) {
static SDValue combineLoopMAddPattern(SDNode *N, SelectionDAG &DAG,
const X86Subtarget &Subtarget) {
if (!Subtarget.hasSSE2())
return SDValue();
SDValue MulOp = N->getOperand(0);
SDValue Phi = N->getOperand(1);
@ -35275,6 +35278,9 @@ static SDValue combineLoopMAddPattern(SDNode *N, SelectionDAG &DAG,
static SDValue combineLoopSADPattern(SDNode *N, SelectionDAG &DAG,
const X86Subtarget &Subtarget) {
if (!Subtarget.hasSSE2())
return SDValue();
SDLoc DL(N);
EVT VT = N->getValueType(0);
SDValue Op0 = N->getOperand(0);