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/bmi.ll | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'llvm/test/CodeGen/X86/bmi.ll') diff --git a/llvm/test/CodeGen/X86/bmi.ll b/llvm/test/CodeGen/X86/bmi.ll index 10b1f51e3da..afeba4ef2d9 100644 --- a/llvm/test/CodeGen/X86/bmi.ll +++ b/llvm/test/CodeGen/X86/bmi.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by update_llc_test_checks.py +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+bmi,+bmi2 | FileCheck %s declare i8 @llvm.cttz.i8(i8, i1) @@ -12,6 +12,7 @@ define i8 @t1(i8 %x) { ; CHECK-NEXT: movzbl %dil, %eax ; CHECK-NEXT: orl $256, %eax # imm = 0x100 ; CHECK-NEXT: tzcntl %eax, %eax +; CHECK-NEXT: # kill: %AL %AL %EAX ; CHECK-NEXT: retq %tmp = tail call i8 @llvm.cttz.i8( i8 %x, i1 false ) ret i8 %tmp @@ -59,6 +60,7 @@ define i8 @t5(i8 %x) { ; CHECK: # BB#0: ; CHECK-NEXT: movzbl %dil, %eax ; CHECK-NEXT: tzcntl %eax, %eax +; CHECK-NEXT: # kill: %AL %AL %EAX ; CHECK-NEXT: retq %tmp = tail call i8 @llvm.cttz.i8( i8 %x, i1 true ) ret i8 %tmp @@ -455,6 +457,7 @@ entry: define i64 @bzhi64b(i64 %x, i8 zeroext %index) { ; CHECK-LABEL: bzhi64b: ; CHECK: # BB#0: # %entry +; CHECK-NEXT: # kill: %ESI %ESI %RSI ; CHECK-NEXT: bzhiq %rsi, %rdi, %rax ; CHECK-NEXT: retq entry: -- cgit v1.2.3