xref: /llvm-project/llvm/test/CodeGen/X86/inline-asm-avx512f-x-constraint.ll (revision 3d6e4160d52da60c39952abc8e6d2189de0b4e64)
1; RUN: not llc < %s -mtriple=x86_64-unknown-unknown -mattr=avx512f -stop-after=finalize-isel > %t 2> %t.err
2; RUN: FileCheck < %t %s
3; RUN: FileCheck --check-prefix=CHECK-STDERR < %t.err %s
4; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=avx512bf16,avx512fp16 -stop-after=finalize-isel | FileCheck --check-prefixes=CHECK,FP16 %s
5
6; CHECK-LABEL: name: mask_Yk_i8
7; CHECK: %[[REG1:.*]]:vr512_0_15 = COPY %1
8; CHECK: %[[REG2:.*]]:vr512_0_15 = COPY %2
9; CHECK: INLINEASM &"vpaddq\09$3, $2, $0 {$1}", 0 /* attdialect */, {{.*}}, def %{{.*}}, {{.*}}, %{{.*}}, {{.*}}, %[[REG1]], {{.*}}, %[[REG2]], 12 /* clobber */, implicit-def early-clobber $df, 12 /* clobber */, implicit-def early-clobber $fpsw, 12 /* clobber */, implicit-def early-clobber $eflags
10
11define <8 x i64> @mask_Yk_i8(i8 signext %msk, <8 x i64> %x, <8 x i64> %y) {
12entry:
13  %0 = tail call <8 x i64> asm "vpaddq\09$3, $2, $0 {$1}", "=x,^Yk,x,x,~{dirflag},~{fpsr},~{flags}"(i8 %msk, <8 x i64> %x, <8 x i64> %y)
14  ret <8 x i64> %0
15}
16
17; FP16-LABEL: name: mask_Yk_f16
18; FP16: %[[REG1:.*]]:vr512_0_15 = COPY %1
19; FP16: %[[REG2:.*]]:vr512_0_15 = COPY %2
20; FP16: INLINEASM &"vaddph\09$3, $2, $0 {$1}", 0 /* attdialect */, {{.*}}, def %{{.*}}, {{.*}}, %{{.*}}, {{.*}}, %[[REG1]], {{.*}}, %[[REG2]], 12 /* clobber */, implicit-def early-clobber $df, 12 /* clobber */, implicit-def early-clobber $fpsw, 12 /* clobber */, implicit-def early-clobber $eflags
21; CHECK-STDERR: couldn't allocate output register for constraint 'x'
22define <32 x half> @mask_Yk_f16(i8 signext %msk, <32 x half> %x, <32 x half> %y) {
23entry:
24  %0 = tail call <32 x half> asm "vaddph\09$3, $2, $0 {$1}", "=x,^Yk,x,x,~{dirflag},~{fpsr},~{flags}"(i8 %msk, <32 x half> %x, <32 x half> %y)
25  ret <32 x half> %0
26}
27
28; FP16-LABEL: name: mask_Yk_bf16
29; FP16: %[[REG1:.*]]:vr512_0_15 = COPY %1
30; FP16: %[[REG2:.*]]:vr512_0_15 = COPY %2
31; FP16: INLINEASM &"vaddph\09$3, $2, $0 {$1}", 0 /* attdialect */, {{.*}}, def %{{.*}}, {{.*}}, %{{.*}}, {{.*}}, %[[REG1]], {{.*}}, %[[REG2]], 12 /* clobber */, implicit-def early-clobber $df, 12 /* clobber */, implicit-def early-clobber $fpsw, 12 /* clobber */, implicit-def early-clobber $eflags
32; CHECK-STDERR: couldn't allocate output register for constraint 'x'
33define <32 x bfloat> @mask_Yk_bf16(i8 signext %msk, <32 x bfloat> %x, <32 x bfloat> %y) {
34entry:
35  %0 = tail call <32 x bfloat> asm "vaddph\09$3, $2, $0 {$1}", "=x,^Yk,x,x,~{dirflag},~{fpsr},~{flags}"(i8 %msk, <32 x bfloat> %x, <32 x bfloat> %y)
36  ret <32 x bfloat> %0
37}
38