[llvm] r213780 - [SKX] Added missed test files for rev 213757
Robert Khasanov
rob.khasanov at gmail.com
Wed Jul 23 11:17:49 PDT 2014
Author: rkhasanov
Date: Wed Jul 23 13:17:49 2014
New Revision: 213780
URL: http://llvm.org/viewvc/llvm-project?rev=213780&view=rev
Log:
[SKX] Added missed test files for rev 213757
Added:
llvm/trunk/test/CodeGen/X86/avx512bw-mask-op.ll
llvm/trunk/test/CodeGen/X86/avx512dq-mask-op.ll
llvm/trunk/test/MC/X86/x86-64-avx512bw.s
llvm/trunk/test/MC/X86/x86-64-avx512dq.s
Added: llvm/trunk/test/CodeGen/X86/avx512bw-mask-op.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512bw-mask-op.ll?rev=213780&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx512bw-mask-op.ll (added)
+++ llvm/trunk/test/CodeGen/X86/avx512bw-mask-op.ll Wed Jul 23 13:17:49 2014
@@ -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, <i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1>
+ %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, <i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1>
+ %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, <i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1>
+ %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, <i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1,
+ i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1>
+ %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
+}
Added: llvm/trunk/test/CodeGen/X86/avx512dq-mask-op.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512dq-mask-op.ll?rev=213780&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx512dq-mask-op.ll (added)
+++ llvm/trunk/test/CodeGen/X86/avx512dq-mask-op.ll Wed Jul 23 13:17:49 2014
@@ -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, <i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1>
+ %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, <i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1, i1 -1>
+ %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
+}
Added: llvm/trunk/test/MC/X86/x86-64-avx512bw.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-64-avx512bw.s?rev=213780&view=auto
==============================================================================
--- llvm/trunk/test/MC/X86/x86-64-avx512bw.s (added)
+++ llvm/trunk/test/MC/X86/x86-64-avx512bw.s Wed Jul 23 13:17:49 2014
@@ -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
Added: llvm/trunk/test/MC/X86/x86-64-avx512dq.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-64-avx512dq.s?rev=213780&view=auto
==============================================================================
--- llvm/trunk/test/MC/X86/x86-64-avx512dq.s (added)
+++ llvm/trunk/test/MC/X86/x86-64-avx512dq.s Wed Jul 23 13:17:49 2014
@@ -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
More information about the llvm-commits
mailing list