diff options
author | Owen Anderson <resistor@mac.com> | 2011-01-11 00:36:45 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-01-11 00:36:45 +0000 |
commit | da1c122da5e1a86c8c2bf20e47a43f5c8fefc4e2 (patch) | |
tree | ba0ea2ae5721d9e2aad293f7da32c13844e71ec9 /lib/Target | |
parent | 93c70426f581859f197df1b05fdb1b3664d361a0 (diff) |
Fix a random missed optimization by making InstCombine more aggressive when determining which bits are demanded by
a comparison against a constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/README.txt | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt index dfa00b8c95..194a19219c 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -1627,21 +1627,6 @@ int bar() { return foo("abcd"); } //===---------------------------------------------------------------------===// -InstCombine should use SimplifyDemandedBits to remove the or instruction: - -define i1 @test(i8 %x, i8 %y) { - %A = or i8 %x, 1 - %B = icmp ugt i8 %A, 3 - ret i1 %B -} - -Currently instcombine calls SimplifyDemandedBits with either all bits or just -the sign bit, if the comparison is obviously a sign test. In this case, we only -need all but the bottom two bits from %A, and if we gave that mask to SDB it -would delete the or instruction for us. - -//===---------------------------------------------------------------------===// - functionattrs doesn't know much about memcpy/memset. This function should be marked readnone rather than readonly, since it only twiddles local memory, but functionattrs doesn't handle memset/memcpy/memmove aggressively: |