From 152e7c8b1222d2af61df72c08caaa740e553cb6c Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sat, 9 Jul 2016 00:19:07 +0000 Subject: VirtRegMap: Replace some identity copies with KILL instructions. An identity COPY like this: %AL = COPY %AL, %EAX 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 --- llvm/test/CodeGen/X86/bitreverse.ll | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/test/CodeGen/X86/bitreverse.ll') diff --git a/llvm/test/CodeGen/X86/bitreverse.ll b/llvm/test/CodeGen/X86/bitreverse.ll index 3b6280f16cd..f1b325a03eb 100644 --- a/llvm/test/CodeGen/X86/bitreverse.ll +++ b/llvm/test/CodeGen/X86/bitreverse.ll @@ -131,6 +131,8 @@ define <2 x i16> @test_bitreverse_v2i16(<2 x i16> %a) nounwind { ; CHECK-NEXT: shrl $15, %edx ; CHECK-NEXT: orl %esi, %edx ; CHECK-NEXT: orl %ecx, %edx +; CHECK-NEXT: # kill: %AX %AX %EAX +; CHECK-NEXT: # kill: %DX %DX %EDX ; CHECK-NEXT: popl %esi ; CHECK-NEXT: popl %edi ; CHECK-NEXT: retl -- cgit v1.2.3