@@ -14842,7 +14842,7 @@ CheckForMaskedLoad(SDValue V, SDValue Ptr, SDValue Chain) {
14842
14842
/// Check to see if IVal is something that provides a value as specified by
14843
14843
/// MaskInfo. If so, replace the specified store with a narrower store of
14844
14844
/// truncated IVal.
14845
- static SDNode *
14845
+ static SDValue
14846
14846
ShrinkLoadReplaceStoreWithStore(const std::pair<unsigned, unsigned> &MaskInfo,
14847
14847
SDValue IVal, StoreSDNode *St,
14848
14848
DAGCombiner *DC) {
@@ -14854,14 +14854,14 @@ ShrinkLoadReplaceStoreWithStore(const std::pair<unsigned, unsigned> &MaskInfo,
14854
14854
// that uses this. If not, this is not a replacement.
14855
14855
APInt Mask = ~APInt::getBitsSet(IVal.getValueSizeInBits(),
14856
14856
ByteShift*8, (ByteShift+NumBytes)*8);
14857
- if (!DAG.MaskedValueIsZero(IVal, Mask)) return nullptr ;
14857
+ if (!DAG.MaskedValueIsZero(IVal, Mask)) return SDValue() ;
14858
14858
14859
14859
// Check that it is legal on the target to do this. It is legal if the new
14860
14860
// VT we're shrinking to (i8/i16/i32) is legal or we're still before type
14861
14861
// legalization.
14862
14862
MVT VT = MVT::getIntegerVT(NumBytes*8);
14863
14863
if (!DC->isTypeLegal(VT))
14864
- return nullptr ;
14864
+ return SDValue() ;
14865
14865
14866
14866
// Okay, we can do this! Replace the 'St' store with a store of IVal that is
14867
14867
// shifted by ByteShift and truncated down to NumBytes.
@@ -14895,8 +14895,7 @@ ShrinkLoadReplaceStoreWithStore(const std::pair<unsigned, unsigned> &MaskInfo,
14895
14895
++OpsNarrowed;
14896
14896
return DAG
14897
14897
.getStore(St->getChain(), SDLoc(St), IVal, Ptr,
14898
- St->getPointerInfo().getWithOffset(StOffset), NewAlign)
14899
- .getNode();
14898
+ St->getPointerInfo().getWithOffset(StOffset), NewAlign);
14900
14899
}
14901
14900
14902
14901
/// Look for sequence of load / op / store where op is one of 'or', 'xor', and
@@ -14927,16 +14926,16 @@ SDValue DAGCombiner::ReduceLoadOpStoreWidth(SDNode *N) {
14927
14926
std::pair<unsigned, unsigned> MaskedLoad;
14928
14927
MaskedLoad = CheckForMaskedLoad(Value.getOperand(0), Ptr, Chain);
14929
14928
if (MaskedLoad.first)
14930
- if (SDNode * NewST = ShrinkLoadReplaceStoreWithStore(MaskedLoad,
14929
+ if (SDValue NewST = ShrinkLoadReplaceStoreWithStore(MaskedLoad,
14931
14930
Value.getOperand(1), ST,this))
14932
- return SDValue( NewST, 0) ;
14931
+ return NewST;
14933
14932
14934
14933
// Or is commutative, so try swapping X and Y.
14935
14934
MaskedLoad = CheckForMaskedLoad(Value.getOperand(1), Ptr, Chain);
14936
14935
if (MaskedLoad.first)
14937
- if (SDNode * NewST = ShrinkLoadReplaceStoreWithStore(MaskedLoad,
14936
+ if (SDValue NewST = ShrinkLoadReplaceStoreWithStore(MaskedLoad,
14938
14937
Value.getOperand(0), ST,this))
14939
- return SDValue( NewST, 0) ;
14938
+ return NewST;
14940
14939
}
14941
14940
14942
14941
if ((Opc != ISD::OR && Opc != ISD::XOR && Opc != ISD::AND) ||
0 commit comments