diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-03-03 00:35:56 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-03-03 00:35:56 +0000 |
commit | af13d829456369aae531641ba6423429801d3eff (patch) | |
tree | 39e7e46a700bd375f96ebe2b96386f9c00f1bfc6 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | aa5087f6e5cae62ee48e48cb491128117a96c081 (diff) | |
download | llvm-af13d829456369aae531641ba6423429801d3eff.zip llvm-af13d829456369aae531641ba6423429801d3eff.tar.gz llvm-af13d829456369aae531641ba6423429801d3eff.tar.bz2 |
This test case:
long test(long x) { return (x & 123124) | 3; }
Currently compiles to:
_test:
orl $3, %edi
movq %rdi, %rax
andq $123127, %rax
ret
This is because instruction and DAG combiners canonicalize
(or (and x, C), D) -> (and (or, D), (C | D))
However, this is only profitable if (C & D) != 0. It gets in the way of the
3-addressification because the input bits are known to be zero.
llvm-svn: 97616
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions