[ConstProp] Fix folding of pointer icmp with signed predicates
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 8 Mar 2021 16:12:12 +0000 (17:12 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 8 Mar 2021 16:12:12 +0000 (17:12 +0100)
commitf08148e874088a07b972203a183db00de9c38a70
tree86ea892846340ce03334889eae9186260c1a1b4b
parent2ef03bc3a83f67a98d82a03a0c0f7ac9caf2426f
[ConstProp] Fix folding of pointer icmp with signed predicates

While @g ugt null is always true (ignoring weak symbols),
@g sgt null is not necessarily the case -- that would imply that
it is forbidden to place globals in the high half of the address
space.
llvm/lib/IR/ConstantFold.cpp
llvm/test/Transforms/InstSimplify/ConstProp/icmp-null.ll