[llvm] [GlobalIsel] Combine select of binops (PR #76763)
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 2 21:42:00 PST 2024
================
@@ -558,6 +558,109 @@ class GVecReduce : public GenericMachineInstr {
}
};
+// Represents a binary operation, i.e, x = y op z.
+class GBinOp : public GenericMachineInstr {
+public:
+ Register getLHSReg() const { return getReg(1); }
+ Register getRHSReg() const { return getReg(2); }
+
+ static bool classof(const MachineInstr *MI) {
+ switch (MI->getOpcode()) {
----------------
aemerson wrote:
I was going to suggest that too but it won't compile due to not yet seeing the definition of `GIntBinOp` when parsing this class.
https://github.com/llvm/llvm-project/pull/76763
More information about the llvm-commits
mailing list