Skip to content
Commit 01ceeb19 authored by Jingyue Wu's avatar Jingyue Wu
Browse files

[SeparateConstOffsetFromGEP] Fix an illegitimate optimization on zext

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

llvm-svn: 210439
parent 48a5abee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment