[llvm] [polly] [SCEV] Rename SCEVNoWrapFlags to SCEVFlags (NFC) (PR #225179)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 02:20:37 PDT 2026


================
@@ -997,9 +1007,8 @@ class SCEVLoopAddRecRewriter
 };
 
 template <typename SCEVPtrT>
-inline SCEVUseT<SCEVPtrT>::SCEVUseT(SCEVPtrT S, SCEVNoWrapFlags Flags)
-    : Base(S, 0) {
-  if (any(Flags)) {
+inline SCEVUseT<SCEVPtrT>::SCEVUseT(SCEVPtrT S, SCEVFlags Flags) : Base(S, 0) {
+  if (any(Flags & SCEVFlags::FlagsNoWrapMask)) {
----------------
fhahn wrote:

> The other Flags are not dropped anywhere. Below:

Yep that is what I mean. Any additional flags will not be set-able below, so it seems safer to mask out flags not in `SCEVFlags::FlagsNoWrapMask`  or assert that there are no other flags if all callers ensure that only `NUW|NSW` is passed

https://github.com/llvm/llvm-project/pull/225179


More information about the llvm-commits mailing list