|
1 | | -; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s |
| 1 | +; RUN: not opt -S %s 2>&1 | FileCheck %s |
2 | 2 |
|
3 | 3 | define <4 x float> @transpose(<4 x float> %m, i32 %arg) { |
4 | | -; CHECK: assembly parsed, but does not verify as correct! |
5 | | -; CHECK-NEXT: Result of a matrix operation does not fit in the returned vector! |
| 4 | +; CHECK: Result of a matrix operation does not fit in the returned vector! |
6 | 5 | ; CHECK-NEXT: Result of a matrix operation does not fit in the returned vector! |
7 | 6 | ; CHECK-NEXT: Result of a matrix operation does not fit in the returned vector! |
8 | 7 | ; CHECK-NEXT: immarg operand has non-immediate parameter |
@@ -118,16 +117,43 @@ define void @column.major_store_stride_too_small(ptr %m, i64 %arg) { |
118 | 117 | ret void |
119 | 118 | } |
120 | 119 |
|
| 120 | +; This test ensures that verifier correctly handles very wide and very narrows |
| 121 | +; strides. |
| 122 | + |
| 123 | +define <4 x float> @column.major_load_stride_i8(ptr %m, i32 %arg) { |
| 124 | + %result.1 = call <4 x float> @llvm.matrix.column.major.load.v4f32.i128(ptr %m, i8 16, i1 false, i32 2, i32 2) |
| 125 | + ret <4 x float> %result.1 |
| 126 | +} |
| 127 | + |
| 128 | +define <4 x float> @column.major_load_stride_i128(ptr %m, i32 %arg) { |
| 129 | + %result.1 = call <4 x float> @llvm.matrix.column.major.load.v4f32.i128(ptr %m, i128 u0x10000000000000000, i1 false, i32 2, i32 2) |
| 130 | + ret <4 x float> %result.1 |
| 131 | +} |
| 132 | + |
| 133 | +define void @column.major_store_stride_i8(ptr %m, i64 %arg) { |
| 134 | + call void @llvm.matrix.column.major.store.v4f32.i128(<4 x float> zeroinitializer, ptr %m, i8 16, i1 false, i32 2, i32 2) |
| 135 | + ret void |
| 136 | +} |
| 137 | + |
| 138 | +define void @column.major_store_stride_i128(ptr %m, i64 %arg) { |
| 139 | + call void @llvm.matrix.column.major.store.v4f32.i128(<4 x float> zeroinitializer, ptr %m, i128 u0x10000000000000000, i1 false, i32 2, i32 2) |
| 140 | + ret void |
| 141 | +} |
| 142 | + |
121 | 143 | declare <4 x i32> @llvm.matrix.column.major.load.v4i32.i64(ptr, i64, i1, i32, i32) |
122 | 144 | declare <4 x float> @llvm.matrix.column.major.load.v4f32.p0(ptr, i64, i1, i32, i32) |
123 | 145 | declare <4 x float> @llvm.matrix.column.major.load.v4f32.i64(ptr, i64, i1, i32, i32) |
124 | 146 | declare <6 x float> @llvm.matrix.column.major.load.v6f32.i64(ptr, i64, i1, i32, i32) |
| 147 | +declare <6 x float> @llvm.matrix.column.major.load.v6f32.i8(ptr, i8, i1, i32, i32) |
| 148 | +declare <6 x float> @llvm.matrix.column.major.load.v6f32.i128(ptr, i64, i1, i32, i32) |
125 | 149 |
|
126 | 150 | declare void @llvm.matrix.column.major.store.v4f32.i64(<4 x float>, ptr, i64, i1, i32, i32) |
127 | 151 | declare void @llvm.matrix.column.major.store.v6f32.i64(<6 x float>, ptr, i64, i1, i32, i32) |
128 | 152 | declare void @llvm.matrix.column.major.store.v4i32.vi32(<4 x i32>, ptr, i64, i1, i32, i32) |
129 | 153 | declare void @llvm.matrix.column.major.store.v4f32.p0(<4 x float>, ptr, i64, i1, i32, i32) |
130 | 154 | declare void @llvm.matrix.column.major.store.v4p0.i64(<4 x ptr>, ptr, i64, i1, i32, i32) |
| 155 | +declare void @llvm.matrix.column.major.store.v4p0.i8(<4 x ptr>, ptr, i8, i1, i32, i32) |
| 156 | +declare void @llvm.matrix.column.major.store.v4p0.i128(<4 x ptr>, ptr, i64, i1, i32, i32) |
131 | 157 |
|
132 | 158 | declare <4 x i32> @llvm.matrix.transpose.v4i32.v4f32(<4 x float>, i32, i32) |
133 | 159 | declare <4 x float> @llvm.matrix.transpose.v4f32(<4 x float>, i32, i32) |
|
0 commit comments