projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6c145e
)
[X86] Add a check for SSE2 to the top of combineReductionToHorizontal.
author
Craig Topper
<craig.topper@intel.com>
Fri, 25 Oct 2019 00:41:05 +0000
(17:41 -0700)
committer
Craig Topper
<craig.topper@intel.com>
Fri, 25 Oct 2019 18:11:32 +0000
(11:11 -0700)
Without this, we can create a PSADBW node that isn't legal.
llvm/lib/Target/X86/X86ISelLowering.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/X86/X86ISelLowering.cpp
b/llvm/lib/Target/X86/X86ISelLowering.cpp
index
9e62858
..
6fb870a
100644
(file)
--- a/
llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/
llvm/lib/Target/X86/X86ISelLowering.cpp
@@
-36266,6
+36266,10
@@
static SDValue combineReductionToHorizontal(SDNode *ExtElt, SelectionDAG &DAG,
const X86Subtarget &Subtarget) {
assert(ExtElt->getOpcode() == ISD::EXTRACT_VECTOR_ELT && "Unexpected caller");
+ // We need at least SSE2 to anything here.
+ if (!Subtarget.hasSSE2())
+ return SDValue();
+
ISD::NodeType Opc;
SDValue Rdx =
DAG.matchBinOpReduction(ExtElt, Opc, {ISD::ADD, ISD::FADD}, true);