diff options
| author | Craig Topper <craig.topper@gmail.com> | 2017-03-29 06:55:28 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2017-03-29 06:55:28 +0000 |
| commit | d284606327a58fd4684a63b126079938ff4513cc (patch) | |
| tree | b95dbfdbe21b923ee8805237ec26b8baec7fed2f /llvm/test/CodeGen/X86/pr28173.ll | |
| parent | 60c24878748987d193c91a863a3dc822ee664afc (diff) | |
| download | bcm5719-llvm-d284606327a58fd4684a63b126079938ff4513cc.tar.gz bcm5719-llvm-d284606327a58fd4684a63b126079938ff4513cc.zip | |
[AVX-512] Remove explicit KMOVWrk/KMOVWKr instructions from patterns where we can just use COPY_TO_REGCLASS instead.
This will result in a KMOVW or KMOVD being emitted during register allocation. And in at least some cases this might allow the register coalescer to remove the copy all together.
llvm-svn: 298984
Diffstat (limited to 'llvm/test/CodeGen/X86/pr28173.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/pr28173.ll | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/llvm/test/CodeGen/X86/pr28173.ll b/llvm/test/CodeGen/X86/pr28173.ll index db7d3335215..d9622b99bd9 100644 --- a/llvm/test/CodeGen/X86/pr28173.ll +++ b/llvm/test/CodeGen/X86/pr28173.ll @@ -5,9 +5,6 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" -; Note that the kmovs should really *not* appear in the output, this is an -; artifact of the current poor lowering. This is tracked by PR28175. - define i64 @foo64(i1 zeroext %i) #0 { ; CHECK-LABEL: foo64: ; CHECK: # BB#0: @@ -43,25 +40,13 @@ end: ret i16 %v } -; This code is still not optimal define i16 @foo16_1(i1 zeroext %i, i32 %j) #0 { -; KNL-LABEL: foo16_1: -; KNL: # BB#0: -; KNL-NEXT: kmovw %edi, %k0 -; KNL-NEXT: kmovw %k0, %eax -; KNL-NEXT: andl $1, %eax -; KNL-NEXT: orl $2, %eax -; KNL-NEXT: # kill: %AX<def> %AX<kill> %EAX<kill> -; KNL-NEXT: retq -; -; SKX-LABEL: foo16_1: -; SKX: # BB#0: -; SKX-NEXT: kmovd %edi, %k0 -; SKX-NEXT: kmovw %k0, %eax -; SKX-NEXT: andl $1, %eax -; SKX-NEXT: orl $2, %eax -; SKX-NEXT: # kill: %AX<def> %AX<kill> %EAX<kill> -; SKX-NEXT: retq +; CHECK-LABEL: foo16_1: +; CHECK: # BB#0: +; CHECK-NEXT: andl $1, %edi +; CHECK-NEXT: orl $2, %edi +; CHECK-NEXT: movl %edi, %eax +; CHECK-NEXT: retq br label %bb bb: |

