summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Zarzycki <dave@znu.io>2019-10-15 17:40:12 +0000
committerDavid Zarzycki <dave@znu.io>2019-10-15 17:40:12 +0000
commit59390efef2599a268f2249f7d3f80111952d53ff (patch)
treee79de308f4bd4e8b8088e485631541d2468eb095 /llvm/lib/CodeGen
parent27c7a9b157555e53fb3887e87a492f74fa8bcc56 (diff)
downloadbcm5719-llvm-59390efef2599a268f2249f7d3f80111952d53ff.tar.gz
bcm5719-llvm-59390efef2599a268f2249f7d3f80111952d53ff.zip
[X86] Make memcmp() use PTEST if possible and also enable AVX1
llvm-svn: 374922
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 43fa86b1182..60101d20116 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4344,7 +4344,9 @@ SDValue DAGCombiner::hoistLogicOpWithSameOpcodeHands(SDNode *N) {
if ((HandOpcode == ISD::BITCAST || HandOpcode == ISD::SCALAR_TO_VECTOR) &&
Level <= AfterLegalizeTypes) {
// Input types must be integer and the same.
- if (XVT.isInteger() && XVT == Y.getValueType()) {
+ if (XVT.isInteger() && XVT == Y.getValueType() &&
+ !(VT.isVector() && TLI.isTypeLegal(VT) &&
+ !XVT.isVector() && !TLI.isTypeLegal(XVT))) {
SDValue Logic = DAG.getNode(LogicOpcode, DL, XVT, X, Y);
return DAG.getNode(HandOpcode, DL, VT, Logic);
}
OpenPOWER on IntegriCloud