diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 7c212e7b7a3..05217797319 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -1450,6 +1450,9 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal, AI->getName())); InstResult = AllocaTmps.back(); } else if (CallInst *CI = dyn_cast(CurInst)) { + // Cannot handle inline asm. + if (isa(CI->getOperand(0))) return false; + // Resolve function pointers. Function *Callee = dyn_cast(getVal(Values, CI->getOperand(0))); if (!Callee) return false; // Cannot resolve.