]> granicus.if.org Git - llvm/commit
Revert "Revert two GEP-related InstCombine commits"
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 1 Sep 2014 21:10:02 +0000 (21:10 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 1 Sep 2014 21:10:02 +0000 (21:10 +0000)
commita0b2af46a54dc5a3fd8f27deed78828d1833e97a
treea483d1d1fc49eaf91e32299cb074eaa12d803c46
parent3c7bd3fbefbe6385321befa4c9cc4e426e991a12
Revert "Revert two GEP-related InstCombine commits"

This reverts commit r216698 which reverted r216523 and r216598.

We would attempt to perform the transformation even if the match()
failed because, as a side effect, it would set V.  This would trick us
into believing that we correctly found a place to correctly apply the
transform.

An additional test case was added to getelementptr.ll so that we might
not regress in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216890 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/getelementptr.ll