[PATCH] D106776: [GlobalISel] Add a constant folding combine.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 05:19:45 PDT 2021


foad added a comment.

In D106776#2910090 <https://reviews.llvm.org/D106776#2910090>, @foad wrote:

>> These don't always get folded because when the instructions are created the constants are obscured by artifacts, or other reasons.
>
> For the AMDGPU fshl/fshr tests, the reason is that the foldable instructions are created during legalization, and the AMDGPU legalizer doesn't use CSEMIRBuilder yet.

Scratch that. The reason is that the constants are obscured by artifacts like G_ZEXT, which we don't constant fold (I previously tried that in D89392 <https://reviews.llvm.org/D89392>).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106776/new/

https://reviews.llvm.org/D106776



More information about the llvm-commits mailing list