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/clz.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/clz.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/clz.ll | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/clz.ll b/llvm/test/CodeGen/X86/clz.ll index 8822515e0d5..9fcaa4c4fe5 100644 --- a/llvm/test/CodeGen/X86/clz.ll +++ b/llvm/test/CodeGen/X86/clz.ll @@ -14,6 +14,7 @@ define i8 @cttz_i8(i8 %x) { ; CHECK: # BB#0: ; CHECK-NEXT: movzbl %dil, %eax ; CHECK-NEXT: bsfl %eax, %eax +; CHECK-NEXT: # kill ; CHECK-NEXT: retq %tmp = call i8 @llvm.cttz.i8( i8 %x, i1 true ) ret i8 %tmp @@ -52,6 +53,7 @@ define i8 @ctlz_i8(i8 %x) { ; CHECK-NEXT: movzbl %dil, %eax ; CHECK-NEXT: bsrl %eax, %eax ; CHECK-NEXT: xorl $7, %eax +; CHECK-NEXT: # kill ; CHECK-NEXT: retq %tmp2 = call i8 @llvm.ctlz.i8( i8 %x, i1 true ) ret i8 %tmp2 @@ -62,6 +64,7 @@ define i16 @ctlz_i16(i16 %x) { ; CHECK: # BB#0: ; CHECK-NEXT: bsrw %di, %ax ; CHECK-NEXT: xorl $15, %eax +; CHECK-NEXT: # kill ; CHECK-NEXT: retq %tmp2 = call i16 @llvm.ctlz.i16( i16 %x, i1 true ) ret i16 %tmp2 @@ -100,6 +103,7 @@ define i8 @ctlz_i8_zero_test(i8 %n) { ; CHECK-NEXT: bsrl %eax, %eax ; CHECK-NEXT: xorl $7, %eax ; CHECK-NEXT: .LBB8_2: # %cond.end +; CHECK-NEXT: # kill ; CHECK-NEXT: retq %tmp1 = call i8 @llvm.ctlz.i8(i8 %n, i1 false) ret i8 %tmp1 @@ -117,6 +121,7 @@ define i16 @ctlz_i16_zero_test(i16 %n) { ; CHECK-NEXT: bsrw %di, %ax ; CHECK-NEXT: xorl $15, %eax ; CHECK-NEXT: .LBB9_2: # %cond.end +; CHECK-NEXT: # kill ; CHECK-NEXT: retq %tmp1 = call i16 @llvm.ctlz.i16(i16 %n, i1 false) ret i16 %tmp1 @@ -168,6 +173,7 @@ define i8 @cttz_i8_zero_test(i8 %n) { ; CHECK-NEXT: movzbl %dil, %eax ; CHECK-NEXT: bsfl %eax, %eax ; CHECK-NEXT: .LBB12_2: # %cond.end +; CHECK-NEXT: # kill ; CHECK-NEXT: retq %tmp1 = call i8 @llvm.cttz.i8(i8 %n, i1 false) ret i8 %tmp1 |