[llvm] [GlobalIsel] Visit ICmp (PR #105991)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 08:35:55 PDT 2024


Thorsten =?utf-8?q?Sch=C3=BCtt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Sch=C3=BCtt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Sch=C3=BCtt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Sch=C3=BCtt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Sch=C3=BCtt?= <schuett at gmail.com>,
Thorsten =?utf-8?q?Sch=C3=BCtt?= <schuett at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/105991 at github.com>


================
@@ -950,6 +950,30 @@ class GExtOrTruncOp : public GCastOp {
   };
 };
 
+/// Represents a splat vector.
+class GSplatVector : public GenericMachineInstr {
+public:
+  Register getValueReg() const { return getOperand(1).getReg(); }
+
+  static bool classof(const MachineInstr *MI) {
+    return MI->getOpcode() == TargetOpcode::G_SPLAT_VECTOR;
+  };
+};
+
+/// Represents an integer-like extending operation.
+class GZextOrSextOp : public GCastOp {
+public:
+  static bool classof(const MachineInstr *MI) {
+    switch (MI->getOpcode()) {
+    case TargetOpcode::G_SEXT:
+    case TargetOpcode::G_ZEXT:
+      return true;
+    default:
+      return false;
+    }
+  };
+};
+
----------------
arsenm wrote:

Should extract the infrastructure bits out of this 

https://github.com/llvm/llvm-project/pull/105991


More information about the llvm-commits mailing list