From 11d08548fd79fc7e86ec445ede82df27c6074424 Mon Sep 17 00:00:00 2001 From: Robert Khasanov Date: Wed, 23 Jul 2014 18:17:49 +0000 Subject: [PATCH] [SKX] Added missed test files for rev 213757 llvm-svn: 213780 --- llvm/test/CodeGen/X86/avx512bw-mask-op.ll | 73 +++++++++++++++++++++++++ llvm/test/CodeGen/X86/avx512dq-mask-op.ll | 25 +++++++++ llvm/test/MC/X86/x86-64-avx512bw.s | 89 +++++++++++++++++++++++++++++++ llvm/test/MC/X86/x86-64-avx512dq.s | 49 +++++++++++++++++ 4 files changed, 236 insertions(+) create mode 100644 llvm/test/CodeGen/X86/avx512bw-mask-op.ll create mode 100644 llvm/test/CodeGen/X86/avx512dq-mask-op.ll create mode 100644 llvm/test/MC/X86/x86-64-avx512bw.s create mode 100644 llvm/test/MC/X86/x86-64-avx512dq.s diff --git a/llvm/test/CodeGen/X86/avx512bw-mask-op.ll b/llvm/test/CodeGen/X86/avx512bw-mask-op.ll new file mode 100644 index 0000000..32c1551 --- /dev/null +++ b/llvm/test/CodeGen/X86/avx512bw-mask-op.ll @@ -0,0 +1,73 @@ +; RUN: llc < %s -march=x86-64 -mcpu=skx | FileCheck %s + +define i32 @mask32(i32 %x) { + %m0 = bitcast i32 %x to <32 x i1> + %m1 = xor <32 x i1> %m0, + %ret = bitcast <32 x i1> %m1 to i32 + ret i32 %ret +; CHECK-LABEL: mask32 +; CHECK: kmovd +; CHECK-NEXT: knotd +; CHECK-NEXT: kmovd +; CHECK_NEXT: ret +} + +define i64 @mask64(i64 %x) { + %m0 = bitcast i64 %x to <64 x i1> + %m1 = xor <64 x i1> %m0, + %ret = bitcast <64 x i1> %m1 to i64 + ret i64 %ret +; CHECK-LABEL: mask64 +; CHECK: kmovq +; CHECK-NEXT: knotq +; CHECK-NEXT: kmovq +; CHECK_NEXT: ret +} + +define void @mask32_mem(i32* %ptr) { + %x = load i32* %ptr, align 4 + %m0 = bitcast i32 %x to <32 x i1> + %m1 = xor <32 x i1> %m0, + %ret = bitcast <32 x i1> %m1 to i32 + store i32 %ret, i32* %ptr, align 4 + ret void +; CHECK-LABEL: mask32_mem +; CHECK: kmovd (%rdi), %k{{[0-7]}} +; CHECK-NEXT: knotd +; CHECK-NEXT: kmovd %k{{[0-7]}}, (%rdi) +; CHECK_NEXT: ret +} + +define void @mask64_mem(i64* %ptr) { + %x = load i64* %ptr, align 4 + %m0 = bitcast i64 %x to <64 x i1> + %m1 = xor <64 x i1> %m0, + %ret = bitcast <64 x i1> %m1 to i64 + store i64 %ret, i64* %ptr, align 4 + ret void +; CHECK-LABEL: mask64_mem +; CHECK: kmovq (%rdi), %k{{[0-7]}} +; CHECK-NEXT: knotq +; CHECK-NEXT: kmovq %k{{[0-7]}}, (%rdi) +; CHECK_NEXT: ret +} diff --git a/llvm/test/CodeGen/X86/avx512dq-mask-op.ll b/llvm/test/CodeGen/X86/avx512dq-mask-op.ll new file mode 100644 index 0000000..de50e81 --- /dev/null +++ b/llvm/test/CodeGen/X86/avx512dq-mask-op.ll @@ -0,0 +1,25 @@ +; RUN: llc < %s -march=x86-64 -mcpu=skx | FileCheck %s + +define i8 @mask8(i8 %x) { + %m0 = bitcast i8 %x to <8 x i1> + %m1 = xor <8 x i1> %m0, + %ret = bitcast <8 x i1> %m1 to i8 + ret i8 %ret +; CHECK: mask8 +; CHECK: knotb +; CHECK: ret +} + +define void @mask8_mem(i8* %ptr) { + %x = load i8* %ptr, align 4 + %m0 = bitcast i8 %x to <8 x i1> + %m1 = xor <8 x i1> %m0, + %ret = bitcast <8 x i1> %m1 to i8 + store i8 %ret, i8* %ptr, align 4 + ret void +; CHECK-LABEL: mask8_mem +; CHECK: kmovb (%rdi), %k{{[0-7]}} +; CHECK-NEXT: knotb +; CHECK-NEXT: kmovb %k{{[0-7]}}, (%rdi) +; CHECK: ret +} diff --git a/llvm/test/MC/X86/x86-64-avx512bw.s b/llvm/test/MC/X86/x86-64-avx512bw.s new file mode 100644 index 0000000..8e7c609 --- /dev/null +++ b/llvm/test/MC/X86/x86-64-avx512bw.s @@ -0,0 +1,89 @@ +// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx --show-encoding %s | FileCheck %s + +// CHECK: knotq %k6, %k3 +// CHECK: encoding: [0xc4,0xe1,0xf8,0x44,0xde] + knotq %k6, %k3 + +// CHECK: knotd %k4, %k3 +// CHECK: encoding: [0xc4,0xe1,0xf9,0x44,0xdc] + knotd %k4, %k3 + +// CHECK: kmovq %k5, %k2 +// CHECK: encoding: [0xc4,0xe1,0xf8,0x90,0xd5] + kmovq %k5, %k2 + +// CHECK: kmovq (%rcx), %k2 +// CHECK: encoding: [0xc4,0xe1,0xf8,0x90,0x11] + kmovq (%rcx), %k2 + +// CHECK: kmovq 291(%rax,%r14,8), %k2 +// CHECK: encoding: [0xc4,0xa1,0xf8,0x90,0x94,0xf0,0x23,0x01,0x00,0x00] + kmovq 291(%rax,%r14,8), %k2 + +// CHECK: kmovd %k4, %k5 +// CHECK: encoding: [0xc4,0xe1,0xf9,0x90,0xec] + kmovd %k4, %k5 + +// CHECK: kmovd (%rcx), %k5 +// CHECK: encoding: [0xc4,0xe1,0xf9,0x90,0x29] + kmovd (%rcx), %k5 + +// CHECK: kmovd 291(%rax,%r14,8), %k5 +// CHECK: encoding: [0xc4,0xa1,0xf9,0x90,0xac,0xf0,0x23,0x01,0x00,0x00] + kmovd 291(%rax,%r14,8), %k5 + +// CHECK: kmovq %k3, (%rcx) +// CHECK: encoding: [0xc4,0xe1,0xf8,0x91,0x19] + kmovq %k3, (%rcx) + +// CHECK: kmovq %k3, 291(%rax,%r14,8) +// CHECK: encoding: [0xc4,0xa1,0xf8,0x91,0x9c,0xf0,0x23,0x01,0x00,0x00] + kmovq %k3, 291(%rax,%r14,8) + +// CHECK: kmovd %k3, (%rcx) +// CHECK: encoding: [0xc4,0xe1,0xf9,0x91,0x19] + kmovd %k3, (%rcx) + +// CHECK: kmovd %k3, 291(%rax,%r14,8) +// CHECK: encoding: [0xc4,0xa1,0xf9,0x91,0x9c,0xf0,0x23,0x01,0x00,0x00] + kmovd %k3, 291(%rax,%r14,8) + +// CHECK: kmovq %rax, %k2 +// CHECK: encoding: [0xc4,0xe1,0xfb,0x92,0xd0] + kmovq %rax, %k2 + +// CHECK: kmovq %r8, %k2 +// CHECK: encoding: [0xc4,0xc1,0xfb,0x92,0xd0] + kmovq %r8, %k2 + +// CHECK: kmovd %eax, %k4 +// CHECK: encoding: [0xc5,0xfb,0x92,0xe0] + kmovd %eax, %k4 + +// CHECK: kmovd %ebp, %k4 +// CHECK: encoding: [0xc5,0xfb,0x92,0xe5] + kmovd %ebp, %k4 + +// CHECK: kmovd %r13d, %k4 +// CHECK: encoding: [0xc4,0xc1,0x7b,0x92,0xe5] + kmovd %r13d, %k4 + +// CHECK: kmovq %k3, %rax +// CHECK: encoding: [0xc4,0xe1,0xfb,0x93,0xc3] + kmovq %k3, %rax + +// CHECK: kmovq %k3, %r8 +// CHECK: encoding: [0xc4,0x61,0xfb,0x93,0xc3] + kmovq %k3, %r8 + +// CHECK: kmovd %k5, %eax +// CHECK: encoding: [0xc5,0xfb,0x93,0xc5] + kmovd %k5, %eax + +// CHECK: kmovd %k5, %ebp +// CHECK: encoding: [0xc5,0xfb,0x93,0xed] + kmovd %k5, %ebp + +// CHECK: kmovd %k5, %r13d +// CHECK: encoding: [0xc5,0x7b,0x93,0xed] + kmovd %k5, %r13d diff --git a/llvm/test/MC/X86/x86-64-avx512dq.s b/llvm/test/MC/X86/x86-64-avx512dq.s new file mode 100644 index 0000000..7724a67 --- /dev/null +++ b/llvm/test/MC/X86/x86-64-avx512dq.s @@ -0,0 +1,49 @@ +// RUN: llvm-mc -triple x86_64-unknown-unknown -mcpu=skx --show-encoding %s | FileCheck %s + +// CHECK: knotb %k3, %k3 +// CHECK: encoding: [0xc5,0xf9,0x44,0xdb] + knotb %k3, %k3 + +// CHECK: kmovb %k3, %k5 +// CHECK: encoding: [0xc5,0xf9,0x90,0xeb] + kmovb %k3, %k5 + +// CHECK: kmovb (%rcx), %k5 +// CHECK: encoding: [0xc5,0xf9,0x90,0x29] + kmovb (%rcx), %k5 + +// CHECK: kmovb 4660(%rax,%r14,8), %k5 +// CHECK: encoding: [0xc4,0xa1,0x79,0x90,0xac,0xf0,0x34,0x12,0x00,0x00] + kmovb 4660(%rax,%r14,8), %k5 + +// CHECK: kmovb %k2, (%rcx) +// CHECK: encoding: [0xc5,0xf9,0x91,0x11] + kmovb %k2, (%rcx) + +// CHECK: kmovb %k2, 4660(%rax,%r14,8) +// CHECK: encoding: [0xc4,0xa1,0x79,0x91,0x94,0xf0,0x34,0x12,0x00,0x00] + kmovb %k2, 4660(%rax,%r14,8) + +// CHECK: kmovb %eax, %k2 +// CHECK: encoding: [0xc5,0xf9,0x92,0xd0] + kmovb %eax, %k2 + +// CHECK: kmovb %ebp, %k2 +// CHECK: encoding: [0xc5,0xf9,0x92,0xd5] + kmovb %ebp, %k2 + +// CHECK: kmovb %r13d, %k2 +// CHECK: encoding: [0xc4,0xc1,0x79,0x92,0xd5] + kmovb %r13d, %k2 + +// CHECK: kmovb %k3, %eax +// CHECK: encoding: [0xc5,0xf9,0x93,0xc3] + kmovb %k3, %eax + +// CHECK: kmovb %k3, %ebp +// CHECK: encoding: [0xc5,0xf9,0x93,0xeb] + kmovb %k3, %ebp + +// CHECK: kmovb %k3, %r13d +// CHECK: encoding: [0xc5,0x79,0x93,0xeb] + kmovb %k3, %r13d -- 2.7.4