Handle the case where a sign extension has ended up being split into separate stages (typically to get around vector legal ops) and a zext + sext_in_reg gets inserted.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Hi Simon,
I only have one question. Otherwise the patch LGMT.
Thanks
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
7130–7148 | Your new rule has a lot in common with the folding rules between lines [7130:7138]. You could potentially extend those folding rules to accomodate your extra case (ISD::ZERO_EXTEND). The only difference seems to be the check for EVTBits. All other checks (for legal operations) are identical. |
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
7130–7148 | Thanks Andrea, I did try to merge the two but I the extra EVTBits logic just made it difficult to grok. |
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
7130–7148 | Ah I see. I think it is fine then. LGTM. Thanks! |
Your new rule has a lot in common with the folding rules between lines [7130:7138]. You could potentially extend those folding rules to accomodate your extra case (ISD::ZERO_EXTEND). The only difference seems to be the check for EVTBits. All other checks (for legal operations) are identical.