[llvm] [SPIRV][Matrix] Legalize ICmp and Fcmp (PR #218467)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 24 21:06:56 PDT 2026
================
@@ -213,8 +216,38 @@ define internal void @narrow_16elem_sext() {
;--- G_ICMP/G_FCMP: split the flattened matrix into 4-lane comparisons ---
+; CHECK-LABEL: ; -- Begin function icmp_3x3
+; CHECK-COUNT-8: OpLoad %[[Int32]]
+; CHECK: %[[ICMP_AS:[0-9]+]] = OpLoad %[[Int32]]
+; CHECK-COUNT-8: OpLoad %[[Int32]]
+; CHECK: %[[ICMP_BS:[0-9]+]] = OpLoad %[[Int32]]
+; CHECK: %[[ICMP_A0:[0-9]+]] = OpCompositeConstruct %[[Vec4Int32]]
+; CHECK: %[[ICMP_A1:[0-9]+]] = OpCompositeConstruct %[[Vec4Int32]]
+; CHECK: %[[ICMP_B0:[0-9]+]] = OpCompositeConstruct %[[Vec4Int32]]
+; CHECK: %[[ICMP_B1:[0-9]+]] = OpCompositeConstruct %[[Vec4Int32]]
----------------
farzonl wrote:
The OPLoads would have populated this but it was looking very noisy and I would rather just CHECK-COUNT-8 them .
The important thing is ICMP_AS and ICMP_BS so that the final OpIEqual is on the last element of the 9x9.
https://github.com/llvm/llvm-project/pull/218467
More information about the llvm-commits
mailing list