[SeparateConstOffsetFromGEP] Fixed a bug in rebuilding OR expressions
authorJingyue Wu <jingyue@google.com>
Sat, 25 Oct 2014 17:36:21 +0000 (17:36 +0000)
committerJingyue Wu <jingyue@google.com>
Sat, 25 Oct 2014 17:36:21 +0000 (17:36 +0000)
commit5c50ab84b32d52f7053a53d2b76f95022e7c3ef3
tree6eb2e6600f4975819a3f008a77f3800d5b37a052
parentc31aaa5a3fcef2851898fb30c61c16a70564079a
[SeparateConstOffsetFromGEP] Fixed a bug in rebuilding OR expressions

The two operands of the new OR expression should be NextInChain and TheOther
instead of the two original operands.

Added a regression test in split-gep.ll.

Hao Liu reported this bug, and provded the test case and an initial patch.
Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220615 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll