[PATCH] D146903: [SimplifyCFG] add nsw on SwitchToLookupTable Index calculation
Kohei Asano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 21 22:38:47 PDT 2023
khei4 added a comment.
Thank you for the review!
> 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.
Sure!
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6505
+ // we can try to attach nsw.
+ bool CanBeWrapped = true;
+ if (!DefaultIsReachable)
----------------
nikic wrote:
> CanBeWrapped -> CanWrap?
Thanks! MayWrap might be correct :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146903/new/
https://reviews.llvm.org/D146903
More information about the llvm-commits
mailing list