[llvm-commits] [llvm] r89434 - /llvm/trunk/lib/Analysis/CaptureTracking.cpp
Duncan Sands
baldrick at free.fr
Sat Nov 21 07:47:29 PST 2009
Hi Chris,
>>> + // Don't count comparisons of two pointers within the same object
>>> + // as captures.
>>> + if (I->getOperand(0)->getUnderlyingObject() ==
>>> + I->getOperand(1)->getUnderlyingObject())
>> I think this bit is ok if you only do equality/inequality comparisons, but
>> is wrong if you allow inequality comparisons. The reason is that this
>
> Isn't this safe with an inbounds gep?
I think it is safe. That said, instcombine would doubtless have simplified
such comparisons into comparisons on the GEP indices anyway, so allowing this
case probably doesn't buy you anything.
Ciao,
Duncan.
More information about the llvm-commits
mailing list