1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=instcombine -S < %s | FileCheck %s
4 ; Prohibit poiter cast for amx.
5 define dso_local void @test_amx_load_store(ptr %src, ptr %dst) {
6 ; CHECK-LABEL: @test_amx_load_store(
8 ; CHECK-NEXT: [[VEC:%.*]] = load <256 x i32>, ptr [[SRC:%.*]], align 64
9 ; CHECK-NEXT: [[BC:%.*]] = bitcast <256 x i32> [[VEC]] to x86_amx
10 ; CHECK-NEXT: tail call void @llvm.x86.tilestored64.internal(i16 16, i16 16, ptr [[DST:%.*]], i64 64, x86_amx [[BC]])
11 ; CHECK-NEXT: ret void
14 %vec = load <256 x i32>, ptr %src, align 64
15 %bc = bitcast <256 x i32> %vec to x86_amx
16 tail call void @llvm.x86.tilestored64.internal(i16 16, i16 16, ptr %dst, i64 64, x86_amx %bc)
20 ; Prohibit poiter cast for amx.
21 define dso_local void @test_amx_load_store2(ptr %dst, ptr %src) {
22 ; CHECK-LABEL: @test_amx_load_store2(
24 ; CHECK-NEXT: [[AMX:%.*]] = tail call x86_amx @llvm.x86.tileloadd64.internal(i16 16, i16 16, ptr [[SRC:%.*]], i64 64)
25 ; CHECK-NEXT: [[BC:%.*]] = bitcast x86_amx [[AMX]] to <256 x i32>
26 ; CHECK-NEXT: store <256 x i32> [[BC]], ptr [[DST:%.*]], align 1024
27 ; CHECK-NEXT: ret void
30 %amx = tail call x86_amx @llvm.x86.tileloadd64.internal(i16 16, i16 16, ptr %src, i64 64)
31 %bc = bitcast x86_amx %amx to <256 x i32>
32 store <256 x i32> %bc, ptr %dst
36 declare x86_amx @llvm.x86.tileloadd64.internal(i16, i16, ptr, i64)
37 declare void @llvm.x86.tilestored64.internal(i16, i16, ptr, i64, x86_amx)