[PATCH] D29107: Fix a bug when unswitching on partial LIV for SwitchInst
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 18 16:56:32 PST 2017
trentxintong added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:679
+ auto CaseVal = SI->findCaseValue(AllZero);
+ if (CaseVal != SI->case_default() &&
+ !BranchesInfo.isUnswitched(SI, AllZero)) {
----------------
sanjoy wrote:
> Why do you care about the case being selected not being the default?
In its form, loop unswitch does not unswitch any value out of the default case. If we unswitch something out of the default here, it will not be recorded as unswitched-out and it will try to unswitch it again.
I guess this can be improved, but i prefer in another patch.
https://reviews.llvm.org/D29107
More information about the llvm-commits
mailing list