[PATCH] D151945: Introduce G_CONSTANT_FOLD_BARRIER and use it to prevent constant folding hoisted constants.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 10:31:38 PDT 2023


aemerson added inline comments.


================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp:85
+  getActionDefinitionsBuilder(
+      {G_IMPLICIT_DEF, G_FREEZE, G_CONSTANT_FOLD_BARRIER})
       .legalFor({p0, s8, s16, s32, s64})
----------------
Pierre-vh wrote:
> Will other targets (e.g. AMDGPU) need this?
Maybe, but I'd like to leave that to AMDGPU maintainers to decide how to legalize this. I'm not even sure of constant hoisting is used for AMDGPU.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151945



More information about the llvm-commits mailing list