[llvm] [GlobalIsel][AArch64] more legal icmps (PR #78239)

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 08:31:48 PST 2024


Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/78239 at github.com>


================
@@ -5314,6 +5314,14 @@ LegalizerHelper::moreElementsVector(MachineInstr &MI, unsigned TypeIdx,
     Observer.changedInstr(MI);
     return Legalized;
   }
+  case TargetOpcode::G_ICMP: {
+    Observer.changingInstr(MI);
+    moreElementsVectorSrc(MI, MoreTy, 2);
+    moreElementsVectorSrc(MI, MoreTy, 3);
+    moreElementsVectorDst(MI, MoreTy, 0);
----------------
davemgreen wrote:

It might need to be similar to the trunc code: https://github.com/llvm/llvm-project/blob/c1a442462d9d47f86392da7e7019ab218d7a3088/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp#L5309, but it might be better to wait until a vector target needs it, and just add a TODO at the moment?

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


More information about the llvm-commits mailing list