[PATCH] D29088: Do not create ctlz/cttz(X, false) when the target do not support zero defined ctlz/cttz.
Amaury SECHET via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 25 16:43:38 PST 2017
deadalnix added a comment.
And the codegen:
_D2gc1d4util6decodeFMKAxhZm:
movq 8(%rdi), %rax
movb (%rax), %al
cmpb $-1, %al
je .LBB2_5
je .LBB2_2
notb %al
movzbl %al, %eax
bsrl %eax, %eax
xorl $7, %eax
movzbl %al, %eax
retq
.LBB2_5:
movl $23, %eax
retq
.LBB2_2:
movb $8, %al
movzbl %al, %eax
retq
Note the double branch.
https://reviews.llvm.org/D29088
More information about the llvm-commits
mailing list