[PATCH] D145326: [InstCombine] Transform `(shift X, Or(Y, BitWidth-1))` -> `(shift X,BitWidth-1)`
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 5 12:22:21 PST 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp:492
+ NewShiftOp->setHasNoSignedWrap(I.hasNoSignedWrap());
+ }
+ return NewShiftOp;
----------------
Can also propagate the `exact` flag. At which point using `replaceOperand()` might actually be cleaner for once.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145326/new/
https://reviews.llvm.org/D145326
More information about the llvm-commits
mailing list