diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2018-03-02 20:51:59 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2018-03-02 20:51:59 +0000 |
commit | db16beed8a8fa79554942f206b8077ae2e91195d (patch) | |
tree | 0829fd50352b62d1fc2297e22f8efc4bb30de564 /llvm/lib/Target | |
parent | 8b19be46c770754cbeb4c8990c2cae0773203904 (diff) | |
download | bcm5719-llvm-db16beed8a8fa79554942f206b8077ae2e91195d.tar.gz bcm5719-llvm-db16beed8a8fa79554942f206b8077ae2e91195d.zip |
[SystemZ] Allow LRV/STRV with volatile memory accesses
The byte-swapping loads and stores do not actually perform multiple
accesses to their memory operand, so they are OK to use with volatile
memory operands as well. Remove overly cautious check.
llvm-svn: 326613
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZISelLowering.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp index e5cf3630033..c6bb86f93f1 100644 --- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp @@ -5249,9 +5249,7 @@ SDValue SystemZTargetLowering::combineSTORE( } } // Combine STORE (BSWAP) into STRVH/STRV/STRVG - // See comment in combineBSWAP about volatile accesses. if (!SN->isTruncatingStore() && - !SN->isVolatile() && Op1.getOpcode() == ISD::BSWAP && Op1.getNode()->hasOneUse() && (Op1.getValueType() == MVT::i16 || @@ -5352,13 +5350,10 @@ SDValue SystemZTargetLowering::combineBSWAP( SDNode *N, DAGCombinerInfo &DCI) const { SelectionDAG &DAG = DCI.DAG; // Combine BSWAP (LOAD) into LRVH/LRV/LRVG - // These loads are allowed to access memory multiple times, and so we must check - // that the loads are not volatile before performing the combine. if (ISD::isNON_EXTLoad(N->getOperand(0).getNode()) && N->getOperand(0).hasOneUse() && (N->getValueType(0) == MVT::i16 || N->getValueType(0) == MVT::i32 || - N->getValueType(0) == MVT::i64) && - !cast<LoadSDNode>(N->getOperand(0))->isVolatile()) { + N->getValueType(0) == MVT::i64)) { SDValue Load = N->getOperand(0); LoadSDNode *LD = cast<LoadSDNode>(Load); |