mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33110 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -586,7 +586,7 @@ BasicAliasAnalysis::CheckGEPInstructions(
|
||||
Constant *Compare = ConstantExpr::getICmp(ICmpInst::ICMP_SGT,
|
||||
G1OC, G2OC);
|
||||
if (ConstantInt *CV = dyn_cast<ConstantInt>(Compare)) {
|
||||
if (CV->getBoolValue()) // If they are comparable and G2 > G1
|
||||
if (CV->getZExtValue()) // If they are comparable and G2 > G1
|
||||
std::swap(GEP1Ops, GEP2Ops); // Make GEP1 < GEP2
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user