[llvm] [SPIR-V] Lower 1xN/Nx1 matrix transpose to a copy (PR #201332)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 05:43:57 PDT 2026


================
@@ -74,7 +74,9 @@ define internal void @test_transpose_f32_2x3() {
 
 ; Test Transpose 1x4 float (Result is 4x1 float), should be a copy (vector of 4 floats)
 ; CHECK-LABEL: ; -- Begin function test_transpose_f32_1x4_to_4x1
-; CHECK: %[[Shuffle:[0-9]+]] = OpVectorShuffle %[[V4F32_ID]] {{.*}} 0 1 2 3
+; CHECK-COUNT-4: OpCompositeInsert %[[V4F32_ID]]
+; CHECK-NOT: OpVectorShuffle
+; CHECK-COUNT-4: OpCompositeExtract %[[Float_ID]]
 define internal void @test_transpose_f32_1x4_to_4x1() {
----------------
jmmartinez wrote:

What is the advantage of lowering one way vs the other?

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


More information about the llvm-commits mailing list