Try to fold SwitchInst before attempting to jumpthread it.
Diff Detail
Diff Detail
- Build Status
Buildable 4592 Build 4592: arc lint + arc unit
Event Timeline
| test/Transforms/JumpThreading/basic.ll | ||
|---|---|---|
| 21 ↗ | (On Diff #90901) | IIRC, SimplifyCFG converts a switch on i1 to a conditional branch. Given that, I can't see how you could ever trigger this in practice. |
Comment Actions
efriedma is right about simplifycfg converting switch(i1) to condbr. so this patch is now
a comment change =).
| lib/Transforms/Scalar/JumpThreading.cpp | ||
|---|---|---|
| 810 | I think the original comment was suggesting that jump threading could use getConstantRange or something like that to prune impossible switch destinations. | |
I think the original comment was suggesting that jump threading could use getConstantRange or something like that to prune impossible switch destinations.