[llvm] [GlobalIsel] Combine cast of const integer. (PR #96139)

Dhruv Chawla via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 02:22:40 PDT 2024


Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/96139 at github.com>


dc03-work wrote:

These combines already exists in the Artifact Combiner:
- `G_ANYEXT`: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h#L97-L114
- `G_ZEXT`: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h#L97-L114
- `G_SEXT`: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h#L241-L253
- `G_TRUNC`: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h#L270-L281 

Can we remove these folds if this gets implemented? Also, please add the fold for `G_ANYEXT` as well.

https://github.com/llvm/llvm-project/pull/96139


More information about the llvm-commits mailing list