mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
cache result of operator*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107972 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -715,9 +715,10 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
|||||||
static bool IsOnlyNullComparedAndFreed(const Value &V) {
|
static bool IsOnlyNullComparedAndFreed(const Value &V) {
|
||||||
for (Value::const_use_iterator UI = V.use_begin(), UE = V.use_end();
|
for (Value::const_use_iterator UI = V.use_begin(), UE = V.use_end();
|
||||||
UI != UE; ++UI) {
|
UI != UE; ++UI) {
|
||||||
if (isFreeCall(*UI))
|
const User *U = *UI;
|
||||||
|
if (isFreeCall(U))
|
||||||
continue;
|
continue;
|
||||||
if (const ICmpInst *ICI = dyn_cast<ICmpInst>(*UI))
|
if (const ICmpInst *ICI = dyn_cast<ICmpInst>(U))
|
||||||
if (ICI->isEquality() && isa<ConstantPointerNull>(ICI->getOperand(1)))
|
if (ICI->isEquality() && isa<ConstantPointerNull>(ICI->getOperand(1)))
|
||||||
continue;
|
continue;
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user