diff options
author | Jingyue Wu <jingyue@google.com> | 2014-06-08 20:19:38 +0000 |
---|---|---|
committer | Jingyue Wu <jingyue@google.com> | 2014-06-08 20:19:38 +0000 |
commit | 01ceeb190d34231bbf2becb33ad1c809034f2bb0 (patch) | |
tree | 411b4404b79ba2e8b711b953d124230b226203b6 /llvm/unittests/Support/MemoryBufferTest.cpp | |
parent | 48a5abeec0614f4fd26ddb26e201d8c70d791ae3 (diff) | |
download | bcm5719-llvm-01ceeb190d34231bbf2becb33ad1c809034f2bb0.tar.gz bcm5719-llvm-01ceeb190d34231bbf2becb33ad1c809034f2bb0.zip |
[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
Diffstat (limited to 'llvm/unittests/Support/MemoryBufferTest.cpp')
0 files changed, 0 insertions, 0 deletions