diff options
author | Matthias Braun <matze@braunis.de> | 2016-07-09 00:19:07 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-07-09 00:19:07 +0000 |
commit | 152e7c8b1222d2af61df72c08caaa740e553cb6c (patch) | |
tree | 7178c1d1db0b5bf2babca7793c71c079854e1156 /llvm/test/CodeGen/X86/vector-bitreverse.ll | |
parent | 07985809abeb97c131d37ee389ee0fea2a646516 (diff) | |
download | bcm5719-llvm-152e7c8b1222d2af61df72c08caaa740e553cb6c.tar.gz bcm5719-llvm-152e7c8b1222d2af61df72c08caaa740e553cb6c.zip |
VirtRegMap: Replace some identity copies with KILL instructions.
An identity COPY like this:
%AL = COPY %AL, %EAX<imp-def>
has no semantic effect, but encodes liveness information: Further users
of %EAX only depend on this instruction even though it does not define
the full register.
Replace the COPY with a KILL instruction in those cases to maintain this
liveness information. (This reverts a small part of r238588 but this
time adds a comment explaining why a KILL instruction is useful).
llvm-svn: 274952
Diffstat (limited to 'llvm/test/CodeGen/X86/vector-bitreverse.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/vector-bitreverse.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/vector-bitreverse.ll b/llvm/test/CodeGen/X86/vector-bitreverse.ll index 2c8d01326bc..25e1f68679d 100644 --- a/llvm/test/CodeGen/X86/vector-bitreverse.ll +++ b/llvm/test/CodeGen/X86/vector-bitreverse.ll @@ -80,6 +80,7 @@ define i8 @test_bitreverse_i8(i8 %a) nounwind { ; XOP-NEXT: vmovd %edi, %xmm0 ; XOP-NEXT: vpperm {{.*}}(%rip), %xmm0, %xmm0, %xmm0 ; XOP-NEXT: vpextrb $0, %xmm0, %eax +; XOP-NEXT: # kill: %AL<def> %AL<kill> %EAX<kill> ; XOP-NEXT: retq %b = call i8 @llvm.bitreverse.i8(i8 %a) ret i8 %b @@ -88,6 +89,7 @@ define i8 @test_bitreverse_i8(i8 %a) nounwind { define i16 @test_bitreverse_i16(i16 %a) nounwind { ; SSE-LABEL: test_bitreverse_i16: ; SSE: # BB#0: +; SSE-NEXT: # kill: %EDI<def> %EDI<kill> %RDI<def> ; SSE-NEXT: movl %edi, %ecx ; SSE-NEXT: andl $32768, %ecx # imm = 0x8000 ; SSE-NEXT: movl %edi, %eax @@ -148,10 +150,12 @@ define i16 @test_bitreverse_i16(i16 %a) nounwind { ; SSE-NEXT: shrl $15, %ecx ; SSE-NEXT: orl %edi, %ecx ; SSE-NEXT: orl %ecx, %eax +; SSE-NEXT: # kill: %AX<def> %AX<kill> %EAX<kill> ; SSE-NEXT: retq ; ; AVX-LABEL: test_bitreverse_i16: ; AVX: # BB#0: +; AVX-NEXT: # kill: %EDI<def> %EDI<kill> %RDI<def> ; AVX-NEXT: movl %edi, %ecx ; AVX-NEXT: andl $32768, %ecx # imm = 0x8000 ; AVX-NEXT: movl %edi, %eax @@ -212,6 +216,7 @@ define i16 @test_bitreverse_i16(i16 %a) nounwind { ; AVX-NEXT: shrl $15, %ecx ; AVX-NEXT: orl %edi, %ecx ; AVX-NEXT: orl %ecx, %eax +; AVX-NEXT: # kill: %AX<def> %AX<kill> %EAX<kill> ; AVX-NEXT: retq ; ; XOP-LABEL: test_bitreverse_i16: @@ -219,6 +224,7 @@ define i16 @test_bitreverse_i16(i16 %a) nounwind { ; XOP-NEXT: vmovd %edi, %xmm0 ; XOP-NEXT: vpperm {{.*}}(%rip), %xmm0, %xmm0, %xmm0 ; XOP-NEXT: vmovd %xmm0, %eax +; XOP-NEXT: # kill: %AX<def> %AX<kill> %EAX<kill> ; XOP-NEXT: retq %b = call i16 @llvm.bitreverse.i16(i16 %a) ret i16 %b @@ -227,6 +233,7 @@ define i16 @test_bitreverse_i16(i16 %a) nounwind { define i32 @test_bitreverse_i32(i32 %a) nounwind { ; SSE-LABEL: test_bitreverse_i32: ; SSE: # BB#0: +; SSE-NEXT: # kill: %EDI<def> %EDI<kill> %RDI<def> ; SSE-NEXT: movl %edi, %eax ; SSE-NEXT: shll $31, %eax ; SSE-NEXT: movl %edi, %ecx @@ -353,6 +360,7 @@ define i32 @test_bitreverse_i32(i32 %a) nounwind { ; ; AVX-LABEL: test_bitreverse_i32: ; AVX: # BB#0: +; AVX-NEXT: # kill: %EDI<def> %EDI<kill> %RDI<def> ; AVX-NEXT: movl %edi, %eax ; AVX-NEXT: shll $31, %eax ; AVX-NEXT: movl %edi, %ecx |