[PATCH] D150230: [GlobalISel] Implement some binary reassociations, G_ADD for now

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 10 20:03:17 PDT 2023


aemerson added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:4492
+      isConstantOrConstantSplatVector(*MRI.getVRegDef(Op01), MRI);
+  std::optional<APInt> C2;
+  if (C1) {
----------------
tschuett wrote:
> Did you hoist `C2`out of the if for future work?
Actually it seems I misread the existing combines, these can be early exits.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150230



More information about the llvm-commits mailing list