summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorArtur Pilipenko <apilipenko@azulsystems.com>2017-02-06 17:48:08 +0000
committerArtur Pilipenko <apilipenko@azulsystems.com>2017-02-06 17:48:08 +0000
commitd3464bf9adc283bd5f75756bf99074f195117509 (patch)
treed5392b1a21686dc30d96604e380e78b4dcc00352 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parenta8ebc34252d42628038de1bb7d566c56a8dcbdd5 (diff)
downloadbcm5719-llvm-d3464bf9adc283bd5f75756bf99074f195117509.tar.gz
bcm5719-llvm-d3464bf9adc283bd5f75756bf99074f195117509.zip
[DAGCombiner] Support bswap as a part of load combine patterns
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D29397 llvm-svn: 294201
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 02221d700bf..97ec5d6b2d7 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4463,6 +4463,9 @@ const Optional<ByteProvider> calculateByteProvider(SDValue Op, unsigned Index,
? ByteProvider::getConstantZero()
: calculateByteProvider(NarrowOp, Index, Depth + 1);
}
+ case ISD::BSWAP:
+ return calculateByteProvider(Op->getOperand(0), ByteWidth - Index - 1,
+ Depth + 1);
case ISD::LOAD: {
auto L = cast<LoadSDNode>(Op.getNode());
OpenPOWER on IntegriCloud