return false;
// It's not safe to eliminate the sign / zero extension of the return value.
- if ((CallerRetAttr & Attribute::ZExt) || (CallerRetAttr & Attribute::SExt))
+ if (CallerRetAttr.hasZExtAttr() || CallerRetAttr.hasSExtAttr())
return false;
// Otherwise, make sure the unmodified return value of I is the return value.
// see if each is transparent.
for (unsigned i = 0, e =cast<StructType>(RetVal->getType())->getNumElements();
i != e; ++i) {
- const Value *InScalar = getNoopInput(FindInsertedValue(RetVal, i), TLI);
+ const Value *InScalar = FindInsertedValue(RetVal, i);
+ if (InScalar == 0) return false;
+ InScalar = getNoopInput(InScalar, TLI);
// If the scalar value being inserted is an extractvalue of the right index
// from the call, then everything is good.
return false;
// It's not safe to eliminate the sign / zero extension of the return value.
- if ((CallerRetAttr & Attribute::ZExt) || (CallerRetAttr & Attribute::SExt))
+ if (CallerRetAttr.hasZExtAttr() || CallerRetAttr.hasSExtAttr())
return false;
// Check if the only use is a function return node.