Combine sext(zext x) to (zext x) since the sign-bit is 0
after the zero-extension.
Combine sext(sext x) to (sext x) and ext(zext x) to (zext x)
since the intermediate step is not needed.
Paths
| Differential D77210
[GlobalISel] Combine sext([sz]ext) -> [sz]ext, zext(zext) -> zext ClosedPublic Authored by gargaroff on Apr 1 2020, 4:13 AM.
Details Summary Combine sext(zext x) to (zext x) since the sign-bit is 0 Combine sext(sext x) to (sext x) and ext(zext x) to (zext x)
Diff Detail
Event Timelinegargaroff added inline comments.
This revision is now accepted and ready to land.Apr 7 2020, 11:46 AM Closed by commit rG432720f1c4c6: [GlobalISel] Combine sext([sz]ext) -> [sz]ext, zext(zext) -> zext (authored by gargaroff). · Explain WhyApr 8 2020, 2:40 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 254163 llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-ext-legalizer.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-saddo.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ssubo.mir
|
Can you just replace the source?