diff options
| author | Craig Topper <craig.topper@gmail.com> | 2016-06-14 03:13:00 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2016-06-14 03:13:00 +0000 |
| commit | 99e30e6a6624109b6b8d06d5d1f95c87bb88ca92 (patch) | |
| tree | 30fabbc67af6785e44a3037c8d3a1fc4980e30fd /llvm/test/CodeGen | |
| parent | ddab3953977c572045fa143c369b2db442458037 (diff) | |
| download | bcm5719-llvm-99e30e6a6624109b6b8d06d5d1f95c87bb88ca92.tar.gz bcm5719-llvm-99e30e6a6624109b6b8d06d5d1f95c87bb88ca92.zip | |
[AVX512] Use MOVZX32 instead of MOVZ16 for loading single v8/v4/v2/v1 masks when KMOVB is not available. This has better behavior with respect to partial register stalls since it won't need to preserve the upper 16-bits of the GPR.
llvm-svn: 272626
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/avx512-insert-extract.ll | 6 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/avx512-mask-op.ll | 8 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/avx512-select.ll | 8 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/masked_gather_scatter.ll | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/llvm/test/CodeGen/X86/avx512-insert-extract.ll b/llvm/test/CodeGen/X86/avx512-insert-extract.ll index 6c621f3f884..308673bc395 100644 --- a/llvm/test/CodeGen/X86/avx512-insert-extract.ll +++ b/llvm/test/CodeGen/X86/avx512-insert-extract.ll @@ -200,7 +200,7 @@ define i16 @test15(i1 *%addr) { } ;CHECK-LABEL: test16 -;CHECK: movzbw (%rdi), %ax +;CHECK: movzbl (%rdi), %eax ;CHECK: kmovw ;CHECK: kshiftlw $10 ;CHECK: korw @@ -214,8 +214,8 @@ define i16 @test16(i1 *%addr, i16 %a) { } ;CHECK-LABEL: test17 -;KNL: movzbw (%rdi), %ax -;KNL: andw $1, %ax +;KNL: movzbl (%rdi), %eax +;KNL: andl $1, %eax ;KNL: kshiftlw $4 ;KNL: korw ;SKX: kshiftlb $4 diff --git a/llvm/test/CodeGen/X86/avx512-mask-op.ll b/llvm/test/CodeGen/X86/avx512-mask-op.ll index b8c3c73cb04..f935270d767 100644 --- a/llvm/test/CodeGen/X86/avx512-mask-op.ll +++ b/llvm/test/CodeGen/X86/avx512-mask-op.ll @@ -88,7 +88,7 @@ define void @mask16_mem(i16* %ptr) { define void @mask8_mem(i8* %ptr) { ; KNL-LABEL: mask8_mem: ; KNL: ## BB#0: -; KNL-NEXT: movzbw (%rdi), %ax +; KNL-NEXT: movzbl (%rdi), %eax ; KNL-NEXT: kmovw %eax, %k0 ; KNL-NEXT: knotw %k0, %k0 ; KNL-NEXT: kmovw %k0, %eax @@ -1341,7 +1341,7 @@ End: define <8 x i64> @load_8i1(<8 x i1>* %a) { ; KNL-LABEL: load_8i1: ; KNL: ## BB#0: -; KNL-NEXT: movzbw (%rdi), %ax +; KNL-NEXT: movzbl (%rdi), %eax ; KNL-NEXT: kmovw %eax, %k1 ; KNL-NEXT: vpbroadcastq {{.*}}(%rip), %zmm0 {%k1} {z} ; KNL-NEXT: retq @@ -1376,7 +1376,7 @@ define <16 x i32> @load_16i1(<16 x i1>* %a) { define <2 x i16> @load_2i1(<2 x i1>* %a) { ; KNL-LABEL: load_2i1: ; KNL: ## BB#0: -; KNL-NEXT: movzbw (%rdi), %ax +; KNL-NEXT: movzbl (%rdi), %eax ; KNL-NEXT: kmovw %eax, %k1 ; KNL-NEXT: vpbroadcastq {{.*}}(%rip), %zmm0 {%k1} {z} ; KNL-NEXT: retq @@ -1394,7 +1394,7 @@ define <2 x i16> @load_2i1(<2 x i1>* %a) { define <4 x i16> @load_4i1(<4 x i1>* %a) { ; KNL-LABEL: load_4i1: ; KNL: ## BB#0: -; KNL-NEXT: movzbw (%rdi), %ax +; KNL-NEXT: movzbl (%rdi), %eax ; KNL-NEXT: kmovw %eax, %k1 ; KNL-NEXT: vpbroadcastq {{.*}}(%rip), %zmm0 {%k1} {z} ; KNL-NEXT: vpmovqd %zmm0, %ymm0 diff --git a/llvm/test/CodeGen/X86/avx512-select.ll b/llvm/test/CodeGen/X86/avx512-select.ll index 10da8facbfe..6a4ec4af703 100644 --- a/llvm/test/CodeGen/X86/avx512-select.ll +++ b/llvm/test/CodeGen/X86/avx512-select.ll @@ -84,9 +84,9 @@ define i8 @select05(i8 %a.0, i8 %m) { define i8 @select05_mem(<8 x i1>* %a.0, <8 x i1>* %m) { ; CHECK-LABEL: select05_mem: ; CHECK: ## BB#0: -; CHECK-NEXT: movzbw (%rsi), %ax +; CHECK-NEXT: movzbl (%rsi), %eax ; CHECK-NEXT: kmovw %eax, %k0 -; CHECK-NEXT: movzbw (%rdi), %ax +; CHECK-NEXT: movzbl (%rdi), %eax ; CHECK-NEXT: kmovw %eax, %k1 ; CHECK-NEXT: korw %k1, %k0, %k0 ; CHECK-NEXT: kmovw %k0, %eax @@ -114,9 +114,9 @@ define i8 @select06(i8 %a.0, i8 %m) { define i8 @select06_mem(<8 x i1>* %a.0, <8 x i1>* %m) { ; CHECK-LABEL: select06_mem: ; CHECK: ## BB#0: -; CHECK-NEXT: movzbw (%rsi), %ax +; CHECK-NEXT: movzbl (%rsi), %eax ; CHECK-NEXT: kmovw %eax, %k0 -; CHECK-NEXT: movzbw (%rdi), %ax +; CHECK-NEXT: movzbl (%rdi), %eax ; CHECK-NEXT: kmovw %eax, %k1 ; CHECK-NEXT: kandw %k1, %k0, %k0 ; CHECK-NEXT: kmovw %k0, %eax diff --git a/llvm/test/CodeGen/X86/masked_gather_scatter.ll b/llvm/test/CodeGen/X86/masked_gather_scatter.ll index 9f8ff6add3e..6ebb2185d03 100644 --- a/llvm/test/CodeGen/X86/masked_gather_scatter.ll +++ b/llvm/test/CodeGen/X86/masked_gather_scatter.ll @@ -291,7 +291,7 @@ define <8 x i32> @test7(i32* %base, <8 x i32> %ind, i8 %mask) { ; KNL_32-LABEL: test7: ; KNL_32: # BB#0: ; KNL_32-NEXT: movl {{[0-9]+}}(%esp), %eax -; KNL_32-NEXT: movzbw {{[0-9]+}}(%esp), %cx +; KNL_32-NEXT: movzbl {{[0-9]+}}(%esp), %ecx ; KNL_32-NEXT: kmovw %ecx, %k1 ; KNL_32-NEXT: vpmovsxdq %ymm0, %zmm0 ; KNL_32-NEXT: kmovw %k1, %k2 |

