[PATCH] D150943: [SimplifyCFG] add nsw on BuildLookuptable LinearMap calculation

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 25 08:26:36 PDT 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6069
         }
+        Wrapped |= Inc ? Val.sle(PrevVal) : Val.sgt(PrevVal);
       }
----------------
I would drop the `Inc` var and directly write
```
Wrapped |= Dist.isStrictlyPositive() ? Val.sle(PrevVal) : Val.sgt(PrevVal);
```
here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150943/new/

https://reviews.llvm.org/D150943



More information about the llvm-commits mailing list