[PATCH] D111524: [GlobalISel] Add support for constant vector folding of binops in CSEMIRBuilder.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 11 07:18:11 PST 2022


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CSEMIRBuilder.cpp:196-197
+          Opc, SrcOps[0].getReg(), SrcOps[1].getReg(), *getMRI(), *this);
+      if (VecCst)
+        return MachineInstrBuilder(getMF(), *VecCst);
+      break;
----------------
This is broken because it's ignoring the DstOp. If it was requesting a specific register, you end up with an undefined vreg


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111524



More information about the llvm-commits mailing list