From: Dan Gohman Date: Mon, 4 Jan 2010 18:38:39 +0000 (+0000) Subject: Add a comment. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=7ba4e17285ba271758dc478cf422b64e7a2f0e8e;p=oota-llvm.git Add a comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92492 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index 170a15f216f..3fabfd07b31 100644 --- a/lib/VMCore/Instruction.cpp +++ b/lib/VMCore/Instruction.cpp @@ -399,6 +399,8 @@ bool Instruction::isSafeToSpeculativelyExecute() const { case Load: { if (cast(this)->isVolatile()) return false; + // Note that it is not safe to speculate into a malloc'd region because + // malloc may return null. if (isa(getOperand(0))) return true; if (GlobalVariable *GV = dyn_cast(getOperand(0)))