zext(a + b) != zext(a) + zext(b) even if a + b >= 0 && b >= 0.
e.g., a = i4 0b1111, b = i4 0b0001
zext a + b to i8 = zext 0b0000 to i8 = 0b00000000
(zext a to i8) + (zext b to i8) = 0b00001111 + 0b00000001 = 0b00010000
Differential D4055
[SeparateConstOffsetFromGEP] Fix an illegitimate optimization on zext jingyue on Jun 7 2014, 10:47 AM. Authored by
Details
Diff Detail |