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

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 23:25:59 PDT 2023


tschuett added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:1475
+    // ConstantHoisting and we should leave it alone.
+    if (isa<ConstantInt>(U.getOperand(0)))
+      return translateCast(TargetOpcode::G_OPAQUE, U, MIRBuilder);
----------------
I would have expected the size to be part of the heuristic. Why G_OPAQUE an i1?


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