[llvm] [polly] [SCEV] Refactor SCEV flags, in preparation to extend (NFC) (PR #225179)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 05:45:13 PDT 2026
================
@@ -427,7 +422,7 @@ class SCEVMinMaxExpr : public SCEVCommutativeExpr {
: SCEVCommutativeExpr(ID, T, O, N, O[0]->getType()) {
assert(isMinMaxType(T));
// Min and max never overflow
- setNoWrapFlags(FlagNUW | FlagNSW);
+ setFlags(FlagNUW | FlagNSW);
----------------
david-arm wrote:
Is there any value in keeping a `setNoWrapFlags` interface that would let you only override the wrap-flags bitfield and leave the other flags (e.g. exact) as is? Otherwise for cases like this you'd have to or this with existing flags, i.e.
```
setFlags(FlagNUW | FlagNSW | getOtherFlags());
```
Keeping the `setNoWrapFlags` interface would also reduce the diff. What do you think?
https://github.com/llvm/llvm-project/pull/225179
More information about the llvm-commits
mailing list