[PATCH] D60673: [SimplifyCFG] Improove and speed up ReduceSwitchRange
Shawn Landden via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 10:38:50 PDT 2019
shawnl added inline comments.
================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:5323-5326
+ if (CaseVal->getValue().ult(MinCaseVal->getValue()))
MinCaseVal = CaseVal;
- if (CaseVal->getValue().sgt(MaxCaseVal->getValue()))
+ if (CaseVal->getValue().ugt(MaxCaseVal->getValue()))
MaxCaseVal = CaseVal;
----------------
lebedev.ri wrote:
> Why is this being changed? Can this be a separate patch?
ReduceSwitchRange now re-orders values so that they start at zero, so is superior to this simple "sort by signed" trick.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60673/new/
https://reviews.llvm.org/D60673
More information about the llvm-commits
mailing list