[llvm] [LIR][SCEVExpander] Restore original flags when aborting transform (PR #82362)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 13:57:48 PST 2024
================
@@ -43,6 +43,37 @@ cl::opt<unsigned> llvm::SCEVCheapExpansionBudget(
using namespace PatternMatch;
+PoisonFlags::PoisonFlags(const Instruction *I) {
+ NUW = false;
+ NSW = false;
+ Exact = false;
+ Disjoint = false;
+ NNeg = false;
+ if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(I)) {
+ NUW = OBO->hasNoUnsignedWrap();
+ NSW = OBO->hasNoUnsignedWrap();
----------------
nikic wrote:
Indeed! Thanks for catching it.
https://github.com/llvm/llvm-project/pull/82362
More information about the llvm-commits
mailing list