Previously it only avoided optimizing signed comparisons to 0.
Sometimes the DAGCombiner will optimize the unsigned comparisons
to 0 before it gets to the peephole pass, but sometimes it doesn't.
Fix for PR22373.
Paths
| Differential D7274
Fix ARM peephole optimizeCompare to avoid optimizing unsigned cmp to 0. ClosedPublic Authored by jvoung on Jan 29 2015, 3:17 PM.
Details Summary Previously it only avoided optimizing signed comparisons to 0. Fix for PR22373.
Diff Detail Event TimelineComment Actions lgtm otherwise.
jvoung edited edge metadata. Comment ActionsApply JF's review suggestion -- annotate the switch cases w/ the bits used. This revision is now accepted and ready to land.Jan 31 2015, 9:23 PM Closed by commit rL227809: Fix ARM peephole optimizeCompare to avoid optimizing unsigned cmp to 0. (authored by jvoung). · Explain WhyFeb 2 2015, 8:58 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 18998 lib/Target/ARM/ARMBaseInstrInfo.cpp
test/CodeGen/ARM/sub-cmp-peephole.ll
|
I think it would be better to rewire the code as: