[PATCH] D22726: [DAGCombine] Match shift amount by value rather than relying on common sub-expressions.
bryant via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 10:09:00 PDT 2016
bryant added a comment.
The InstCombine patch is here: https://reviews.llvm.org/D25913
With that patch:
$ opt -O3 cmp-zext-combine.ll | llc -march=x86-64
nonzero16: # @nonzero16
xorl %eax, %eax
testw %di, %di
setne %al
retq
nonzero32: # @nonzero32
xorl %eax, %eax
testl %edi, %edi
setne %al
retq
nonzero64: # @nonzero64
xorl %eax, %eax
testq %rdi, %rdi
setne %al
retq
which are the results that we want.
Repository:
rL LLVM
https://reviews.llvm.org/D22726
More information about the llvm-commits
mailing list