diff options
author | David Zarzycki <dave@znu.io> | 2019-10-15 17:40:12 +0000 |
---|---|---|
committer | David Zarzycki <dave@znu.io> | 2019-10-15 17:40:12 +0000 |
commit | 59390efef2599a268f2249f7d3f80111952d53ff (patch) | |
tree | e79de308f4bd4e8b8088e485631541d2468eb095 /llvm/lib/CodeGen | |
parent | 27c7a9b157555e53fb3887e87a492f74fa8bcc56 (diff) | |
download | bcm5719-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.cpp | 4 |
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); } |