mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-24 07:35:04 +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:
parent
1d3ae029c4
commit
fc36c0f21f
@ -715,9 +715,10 @@ Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
||||
static bool IsOnlyNullComparedAndFreed(const Value &V) {
|
||||
for (Value::const_use_iterator UI = V.use_begin(), UE = V.use_end();
|
||||
UI != UE; ++UI) {
|
||||
if (isFreeCall(*UI))
|
||||
const User *U = *UI;
|
||||
if (isFreeCall(U))
|
||||
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)))
|
||||
continue;
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user