Bill Wendling
f2c78f344e
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.
llvm-svn: 151691
2012-02-29 01:46:50 +00:00
..
2011-11-29 19:25:30 +00:00
2011-12-02 01:26:24 +00:00
2012-02-20 14:34:57 +00:00
2012-02-29 01:46:50 +00:00
2012-02-06 21:16:41 +00:00
2012-02-06 21:56:39 +00:00
2012-02-21 13:40:06 +00:00
2011-08-16 20:45:24 +00:00
2012-02-06 21:56:39 +00:00
2011-08-15 22:09:40 +00:00
2012-01-20 21:51:11 +00:00
2012-02-07 05:05:23 +00:00
2012-01-27 03:08:05 +00:00
2012-01-27 03:08:05 +00:00
2011-03-05 16:43:46 +00:00
2012-02-06 21:56:39 +00:00
2011-12-12 19:48:00 +00:00
2010-01-24 20:43:08 +00:00