diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-04-24 08:15:31 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-04-24 08:15:31 +0000 |
| commit | f4575db2fdc4e1812932c83696a0579cb219a0dd (patch) | |
| tree | c250cf872598dc72a02ee626de24d48e5db31e41 /llvm/test/Transforms | |
| parent | 4f4dd17d056b02eaa64adf1cad99e14eceabde1b (diff) | |
| download | bcm5719-llvm-f4575db2fdc4e1812932c83696a0579cb219a0dd.tar.gz bcm5719-llvm-f4575db2fdc4e1812932c83696a0579cb219a0dd.zip | |
X86: Emit test instead of constant shift + compare if the shift result is unused.
This allows us to compile
return (mask & 0x8 ? a : b);
into
testb $8, %dil
cmovnel %edx, %esi
instead of
andl $8, %edi
shrl $3, %edi
cmovnel %edx, %esi
which we formed previously because dag combiner canonicalizes setcc of and into shift.
llvm-svn: 207088
Diffstat (limited to 'llvm/test/Transforms')
0 files changed, 0 insertions, 0 deletions

