mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +00:00
InstSimplify: Optimize away useless unsigned comparisons
Code like X < Y && Y == 0 should always be folded away to false. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223583 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1350,7 +1350,7 @@ static ICmpInst::Predicate areGlobalsPotentiallyEqual(const GlobalValue *GV1,
|
||||
const GlobalValue *GV2) {
|
||||
// Don't try to decide equality of aliases.
|
||||
if (!isa<GlobalAlias>(GV1) && !isa<GlobalAlias>(GV2))
|
||||
if (!GV1->hasExternalWeakLinkage() || !GV2->hasExternalWeakLinkage())
|
||||
if (!GV1->hasExternalWeakLinkage() && !GV2->hasExternalWeakLinkage())
|
||||
return ICmpInst::ICMP_NE;
|
||||
return ICmpInst::BAD_ICMP_PREDICATE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user