[PATCH] D146903: [SimplifyCFG] add nsw on SwitchToLookupTable Index calculation

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 10:10:06 PDT 2023


nikic added a comment.

Looks like this no longer affects any of the existing tests. Could you please add a test where this adds the nsw flag? Preferably two tests, one directly before overflow happens, and one directly after.



================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6505
+    // we can try to attach nsw.
+    bool CanBeWrapped = true;
+    if (!DefaultIsReachable)
----------------
CanBeWrapped -> CanWrap?


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

https://reviews.llvm.org/D146903



More information about the llvm-commits mailing list