summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-08-28 04:29:08 +0000
committerCraig Topper <craig.topper@intel.com>2017-08-28 04:29:08 +0000
commit2c77011d1538dd24a497b66155e0e2f70f9e4480 (patch)
treedd52b4bb2d2310f7e4b2ac7002f57743c549037f
parent66faaceeb17f5145ddc305e05fde0d1059e8d211 (diff)
downloadbcm5719-llvm-2c77011d1538dd24a497b66155e0e2f70f9e4480.tar.gz
bcm5719-llvm-2c77011d1538dd24a497b66155e0e2f70f9e4480.zip
[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
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index ecc8ff0b1af..c9afea2d163 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -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);
OpenPOWER on IntegriCloud