[llvm-commits] [llvm] r92412 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/load-cmp.ll
Chris Lattner
sabre at nondot.org
Sat Jan 2 00:40:13 PST 2010
On Jan 2, 2010, at 12:36 AM, Eli Friedman wrote:
>> + case Instruction::Load:
>> + if (GetElementPtrInst *GEP =
>> + dyn_cast<GetElementPtrInst>(LHSI->getOperand(0))) {
>> + if (GlobalVariable *GV = dyn_cast<GlobalVariable>(GEP->getOperand(0)))
>> + if (GV->isConstant() && GV->hasDefinitiveInitializer() &&
>> + !cast<LoadInst>(LHSI)->isVolatile())
>> + if (Instruction *Res = FoldCmpLoadFromIndexedGlobal(GEP, GV, I))
>> + return Res;
>> + //errs() << "NOT HANDLED: " << *GV << "\n";
>> + //errs() << "\t" << *GEP << "\n";
>> + //errs() << "\t " << I << "\n\n\n";
>
> I assume you didn't mean to add the debugging output?
I actually did, I'll remove it when I'm done generalizing the xform.
-Chris
More information about the llvm-commits
mailing list