Closed
Description
the bitshift and bitand version optimizes to
testb $15, %dil
sete %al
retq
while the trailing_zeros
version optimizes to
movl $32, %eax
testl %edi, %edi
je .LBB6_2
bsfl %edi, %eax
.LBB6_2:
cmpl $4, %eax
seta %al
retq
even though I find the trailing_zeros
version much more straight forward
Should this be reported upstream in llvm or is this something a mir pass should do?