llvm-6502/lib/Transforms
Bill Wendling e1b66f1145 Restrict this transformation to equality conditions.
This transformation is not correct for not-equal conditions:

(trunc x) != C1 & (and x, CA) != C2 -> (and x, CA|CMAX) != C1|C2

Let
  C1 == 0
  C2 == 0
  CA == 0xFF0000
  CMAX == 0xFF
and truncating to i8.

The original truth table:

    x   | A: trunc x != 0 | B: x & 0xFF0000 != 0 | A & B != 0
--------------------------------------------------------------
0x00000 |        0        |          0           |     0
0x00001 |        1        |          0           |     0
0x10000 |        0        |          1           |     0
0x10001 |        1        |          1           |     1

The truth table of the replacement:

    x   | x & 0xFF00FF != 0
----------------------------
0x00000 |        0
0x00001 |        1
0x10000 |        1
0x10001 |        1

So they are different.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151691 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 01:46:50 +00:00
..
Hello
InstCombine Restrict this transformation to equality conditions. 2012-02-29 01:46:50 +00:00
Instrumentation [tsan] fix compiler warnings 2012-02-14 00:52:07 +00:00
IPO Plog a memleak in GlobalOpt. 2012-02-27 12:48:24 +00:00
Scalar Reverted r152620 - DSE: Shorten memset when a later store overwrites the start of it. There were all sorts of buildbot issues 2012-02-28 05:06:24 +00:00
Utils Add support for disabling llvm.lifetime intrinsics in the AlwaysInliner. These 2012-02-25 02:56:01 +00:00
Vectorize Update BBVectorize to use aliasesUnknownInst. 2012-02-10 15:52:40 +00:00
CMakeLists.txt Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
LLVMBuild.txt Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
Makefile Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00