Check for legal zext 'sinks' before inserting a trunc.
I think this resolves some/most/all of the issue in D111237. I won't have the time to fix this if it's broken though.
edit: I setup a stage 2 on my mac and this looks fine enough.
Paths
| Differential D115451
[TypePromotion] Avoid some unnecessary truncs ClosedPublic Authored by samparker on Dec 9 2021, 8:47 AM.
Details Summary Check for legal zext 'sinks' before inserting a trunc. I think this resolves some/most/all of the issue in D111237. edit: I setup a stage 2 on my mac and this looks fine enough.
Diff Detail
Event TimelineComment Actions Sorry for the delay. This doesn't fix the original case unfortunately, as that version doesn't start with an icmp. The test case is a little different with the loads feeding the loop condition. This revision is now accepted and ready to land.Jan 31 2022, 5:42 AM Closed by commit rG281d29b8fed3: [TypePromotion] Avoid some unnecessary truncs (authored by samparker). · Explain WhyFeb 2 2022, 2:06 AM This revision was automatically updated to reflect the committed changes. samparker added a reverting change: rG20d75059a2ea: Revert "[TypePromotion] Avoid some unnecessary truncs".Mar 1 2022, 1:00 AM
Revision Contents
Diff 405180 llvm/lib/CodeGen/TypePromotion.cpp
llvm/test/Transforms/TypePromotion/AArch64/lit.local.cfg
llvm/test/Transforms/TypePromotion/AArch64/phi-zext-gep.ll
|