summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-03-01 22:32:25 +0000
committerCraig Topper <craig.topper@intel.com>2018-03-01 22:32:25 +0000
commite7ca6f5456a3b5a836a39b3c99e7d1d740883805 (patch)
tree0bbc06f836bf0d6d56ee30ef7773902d9ef1bfba /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentca552b8d31e12d1068bbd3ac01f8b490712596f0 (diff)
downloadbcm5719-llvm-e7ca6f5456a3b5a836a39b3c99e7d1d740883805.tar.gz
bcm5719-llvm-e7ca6f5456a3b5a836a39b3c99e7d1d740883805.zip
[DAGCombiner] When combining zero_extend of a truncate, only mask before extending for vectors.
Masking first, prevents the extend from being combine with loads. Its also interfering with some vXi1 extraction code. Differential Revision: https://reviews.llvm.org/D42679 llvm-svn: 326500
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index b3a8eeb7c97..1810904b2c6 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -7832,7 +7832,7 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
// Try to mask before the extension to avoid having to generate a larger mask,
// possibly over several sub-vectors.
- if (SrcVT.bitsLT(VT)) {
+ if (SrcVT.bitsLT(VT) && VT.isVector()) {
if (!LegalOperations || (TLI.isOperationLegal(ISD::AND, SrcVT) &&
TLI.isOperationLegal(ISD::ZERO_EXTEND, VT))) {
SDValue Op = N0.getOperand(0);
OpenPOWER on IntegriCloud