Don't fold and's into test instructions if they have multiple uses.
authorChris Lattner <sabre@nondot.org>
Tue, 19 Feb 2008 17:37:35 +0000 (17:37 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 19 Feb 2008 17:37:35 +0000 (17:37 +0000)
commitce2bcc8839834b5f5c5efbf269f547aafb638df4
tree5240754ad82ae5cc04d154dd572ccac16f831f2e
parent22c31769fb1448dba3247780181d527a852d7694
Don't fold and's into test instructions if they have multiple uses.
This compiles test-nofold.ll into:

_test:
movl $15, %ecx
andl 4(%esp), %ecx
testl %ecx, %ecx
movl $42, %eax
cmove %ecx, %eax
ret

instead of:
_test:
movl 4(%esp), %eax
movl %eax, %ecx
andl $15, %ecx
testl $15, %eax
movl $42, %eax
cmove %ecx, %eax
ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47330 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrInfo.td
test/CodeGen/X86/test-nofold.ll [new file with mode: 0644]