SDValue Ptr = ST->getBasePtr();
EVT VT = Value.getValueType();
- if (ST->isTruncatingStore() || VT.isVector() || !Value.hasOneUse())
+ if (ST->isTruncatingStore() || VT.isVector())
return SDValue();
unsigned Opc = Value.getOpcode();
+ if ((Opc != ISD::OR && Opc != ISD::XOR && Opc != ISD::AND) ||
+ !Value.hasOneUse())
+ return SDValue();
+
// If this is "store (or X, Y), P" and X is "(and (load P), cst)", where cst
// is a byte mask indicating a consecutive number of bytes, check to see if
// Y is known to provide just those bytes. If so, we try to replace the
if (!EnableReduceLoadOpStoreWidth)
return SDValue();
- if ((Opc != ISD::OR && Opc != ISD::XOR && Opc != ISD::AND) ||
- Value.getOperand(1).getOpcode() != ISD::Constant)
+ if (Value.getOperand(1).getOpcode() != ISD::Constant)
return SDValue();
SDValue N0 = Value.getOperand(0);