Merging r259375:
authorHans Wennborg <hans@hanshq.net>
Mon, 1 Feb 2016 19:18:10 +0000 (19:18 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 1 Feb 2016 19:18:10 +0000 (19:18 +0000)
commit5ea3635939d3e30182cd5a9881447890c8b69c42
tree4910430559dece40ebff00c139554858bcffb47f
parentaad888f28ee3e920b6e1a3828398f6c9c256f3d3
Merging r259375:
------------------------------------------------------------------------
r259375 | majnemer | 2016-02-01 09:37:56 -0800 (Mon, 01 Feb 2016) | 6 lines

[InstCombine] Don't transform (X+INT_MAX)>=(Y+INT_MAX) -> (X<=Y)

This miscompile came about because we tried to use a transform which was
only appropriate for xor operators when addition was present.

This fixes PR26407.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259390 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/icmp.ll