[PATCH] D85050: [GlobalISel] Combine (logic_op (op x...), (op y...)) -> (op (logic_op x, y))
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 11:47:48 PDT 2020
aemerson added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1830
+ HandInst.addUse(SrcReg);
+ MatchInfo = LogicOpHoistMatchInfo(LogicInst, HandInst);
+ return true;
----------------
I wonder if we can do this in a more functional style, and instead of storing the actual `MachineInstr` in the match info, store a function/lambda that can build and insert the instructions using a given MachineIRBuilder argument. You would have to modify the legality check here to use the other API call instead of passing an MachineInstr.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85050/new/
https://reviews.llvm.org/D85050
More information about the llvm-commits
mailing list