[PATCH] D111777: [GlobalISel] Refactor CSEMIRBuilder's handling of unary op constant folding. NFC.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 23:19:03 PDT 2021


aemerson added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp:226
   }
   case TargetOpcode::G_CTLZ: {
     assert(SrcOps.size() == 1 && "Expected one source");
----------------
The plan is to add support for constant folding more unary opcodes (e.g. G_ABS) by just adding more cases here, and then implementing the folding in `ConstantFoldUnaryOp()`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111777



More information about the llvm-commits mailing list