[llvm] [GlobalIsel] Combine G_VSCALE (PR #94096)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 23:24:12 PDT 2024
================
@@ -856,6 +858,43 @@ class GTrunc : public GCastOp {
};
};
+/// Represents a vscale.
+class GVScale : public GenericMachineInstr {
+public:
+ APInt getSrc() const { return getOperand(1).getCImm()->getValue(); }
+
+ static bool classof(const MachineInstr *MI) {
+ return MI->getOpcode() == TargetOpcode::G_VSCALE;
+ };
+};
+
+/// Represents an integer subtraction.
+class GSub : public GIntBinOp {
+public:
+ static bool classof(const MachineInstr *MI) {
+ return MI->getOpcode() == TargetOpcode::G_SUB;
+ };
+};
+
+/// Represents an integer multiplication.
+class GMul : public GIntBinOp {
+public:
+ static bool classof(const MachineInstr *MI) {
+ return MI->getOpcode() == TargetOpcode::G_MUL;
+ };
+};
+
+/// Represents a shift left.
+class GSHL : public GenericMachineInstr {
----------------
arsenm wrote:
Inconsistent capitalization with other ops, GShl?
https://github.com/llvm/llvm-project/pull/94096
More information about the llvm-commits
mailing list