[PATCH] D112827: [AMDGPU][GlobalISel] Fold G_FNEG above when users cannot fold mods

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 11:22:46 PDT 2021


arsenm added a comment.

We should also apply these pre-legalization like in the DAG



================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:162-170
+void CombinerHelper::replaceOpcodeWith(MachineRegisterInfo &MRI,
+                                       MachineInstr &FromMI,
+                                       unsigned ToOpcode) const {
+  Observer.changingInstr(FromMI);
+
+  FromMI.setDesc(Builder.getTII().get(ToOpcode));
+
----------------
I thought this already existed


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112827



More information about the llvm-commits mailing list