Skip to content

Commit 2d10a4f

Browse files
committed
and a test for bitcast <4 x double> %inv to i256
1 parent 278dbd1 commit 2d10a4f

File tree

1 file changed

+16
-0
lines changed
  • llvm/test/Transforms/LowerMatrixIntrinsics

1 file changed

+16
-0
lines changed

llvm/test/Transforms/LowerMatrixIntrinsics/unary.ll

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,19 @@ define void @bitcast_2x2_i256_to_v4i64(ptr %in, ptr %out) {
232232
call void @llvm.matrix.column.major.store(<4 x double> %op, ptr %out, i64 2, i1 false, i32 2, i32 2)
233233
ret void
234234
}
235+
236+
define void @bitcast_2x2_4i64_to_i256(ptr %in, ptr %out) {
237+
; CHECK-LABEL: @bitcast_2x2_4i64_to_i256(
238+
; CHECK-NEXT: [[COL_LOAD:%.*]] = load <2 x double>, ptr [[IN:%.*]], align 8
239+
; CHECK-NEXT: [[VEC_GEP:%.*]] = getelementptr double, ptr [[IN]], i64 2
240+
; CHECK-NEXT: [[COL_LOAD1:%.*]] = load <2 x double>, ptr [[VEC_GEP]], align 8
241+
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <2 x double> [[COL_LOAD]], <2 x double> [[COL_LOAD1]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
242+
; CHECK-NEXT: [[OP:%.*]] = bitcast <4 x double> [[TMP1]] to i256
243+
; CHECK-NEXT: store i256 [[OP]], ptr [[OUT:%.*]], align 4
244+
; CHECK-NEXT: ret void
245+
;
246+
%inv = call <4 x double> @llvm.matrix.column.major.load(ptr %in, i64 2, i1 false, i32 2, i32 2)
247+
%op = bitcast <4 x double> %inv to i256
248+
store i256 %op, ptr %out
249+
ret void
250+
}

0 commit comments

Comments
 (0)