This was noted in PR24766:
https://llvm.org/bugs/show_bug.cgi?id=24766#c2
We may not know whether the sign bit(s) are zero or one, but we can still optimize based on knowing that the sign bit is repeated.
Paths
| Differential D20275
[SimplifyCFG] eliminate switch cases based on known range of switch condition ClosedPublic Authored by spatel on May 15 2016, 11:58 AM.
Details Summary This was noted in PR24766: We may not know whether the sign bit(s) are zero or one, but we can still optimize based on knowing that the sign bit is repeated.
Diff Detail Event Timeline
This revision is now accepted and ready to land.May 19 2016, 9:30 PM Closed by commit rL270222: [SimplifyCFG] eliminate switch cases based on known range of switch condition (authored by spatel). · Explain WhyMay 20 2016, 7:59 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 57856 lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/switch-masked-bits.ll
|
MinCondWidth --> MaxCondWidth?