instructions. This fixes a PowerPC bug exposed by some unrelated
changes I'm working on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82743
91177308-0d34-0410-b5e6-
96231b3b80d8
}
// Turn STORE (BSWAP) -> sthbrx/stwbrx.
- if (N->getOperand(1).getOpcode() == ISD::BSWAP &&
+ if (cast<StoreSDNode>(N)->isUnindexed() &&
+ N->getOperand(1).getOpcode() == ISD::BSWAP &&
N->getOperand(1).getNode()->hasOneUse() &&
(N->getOperand(1).getValueType() == MVT::i32 ||
N->getOperand(1).getValueType() == MVT::i16)) {