Skip to content

Commit 9bf5167

Browse files
committed
Fixup. Use flipAllBits.
1 parent 9e9812f commit 9bf5167

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20347,7 +20347,7 @@ SDValue DAGCombiner::ReduceLoadOpStoreWidth(SDNode *N) {
2034720347
unsigned BitWidth = N1.getValueSizeInBits();
2034820348
APInt Imm = N1->getAsAPIntVal();
2034920349
if (Opc == ISD::AND)
20350-
Imm ^= APInt::getAllOnes(BitWidth);
20350+
Imm.flipAllBits();
2035120351
if (Imm == 0 || Imm.isAllOnes())
2035220352
return SDValue();
2035320353
// Find least/most significant bit that need to be part of the narrowed
@@ -20413,7 +20413,7 @@ SDValue DAGCombiner::ReduceLoadOpStoreWidth(SDNode *N) {
2041320413

2041420414
APInt NewImm = Imm.lshr(ShAmt).trunc(NewBW);
2041520415
if (Opc == ISD::AND)
20416-
NewImm ^= APInt::getAllOnes(NewBW);
20416+
NewImm.flipAllBits();
2041720417
Align NewAlign = commonAlignment(LD->getAlign(), PtrOff);
2041820418
SDValue NewPtr =
2041920419
DAG.getMemBasePlusOffset(Ptr, TypeSize::getFixed(PtrOff), SDLoc(LD));

0 commit comments

Comments
 (0)