[PATCH] D99032: GlobalISel: Add FoldBinOpIntoSelect combine
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 22 17:39:33 PDT 2021
paquette added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3365
+ Register RHS = MI.getOperand(2).getReg();
+ MachineInstr *Select = MRI.getVRegDef(MI.getOperand(SelectOperand).getReg());
+
----------------
In the match function, you found the G_SELECT using `getOpcodeDef`, which walks through COPY instructions. If that walked through a COPY, I think this will give you the wrong instruction.
================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:882
+ const unsigned Opcode = MI.getOpcode();
+ if (!isBuildVectorOp(Opcode))
+ return false;
----------------
Opcode is only used here?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99032/new/
https://reviews.llvm.org/D99032
More information about the llvm-commits
mailing list