Currently X86ISelLowering has a similar transformation for sexts:
sext(add_nsw(x, C)) --> add(sext(x), C_sext)
See D13757 for motivation.
In this change I extend this code to handle zexts as well.
Paths
| Differential D23359
[x86] X86ISelLowering zext(add_nuw(x, C)) --> add(zext(x), C_zext) ClosedPublic Authored by apilipenko on Aug 10 2016, 9:44 AM.
Details Summary Currently X86ISelLowering has a similar transformation for sexts: In this change I extend this code to handle zexts as well.
Diff Detail Event Timelineapilipenko retitled this revision from to [x86] X86ISelLowering zext(add_nuw(x, C)) --> add(zext(x), C_zext). apilipenko updated this object. spatel edited edge metadata. Comment ActionsLGTM. See inline comment for one nit. Also, unless there's some reason to break this regression test off by itself, I'd prefer to add this test directly to the related test file (and rename the file so it's not inaccurate). Keeping the tests next to each other for context seems better to me.
This revision is now accepted and ready to land.Aug 10 2016, 1:21 PM Closed by commit rL278520: [x86] X86ISelLowering zext(add_nuw(x, C)) --> add(zext(x), C_zext) (authored by apilipenko). · Explain WhyAug 12 2016, 9:16 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 67539 lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/add-nuw-zext.ll
|
This should be named 'NewExt' now for consistency.