X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FCodeGen%2FCodeGenPrepare.cpp;h=ac8fbbf9c762fd7582809a43c1025b867b7e4051;hp=df49c8d6aaeee372e4c32ac38054fcfb8855313e;hb=70b36591bc9e9f0772c62794bf1a202b1884aaf6;hpb=4a0af1e1c440d155c7d9f234448dca7d5c8beddd diff --git a/lib/CodeGen/CodeGenPrepare.cpp b/lib/CodeGen/CodeGenPrepare.cpp index df49c8d6aae..ac8fbbf9c76 100644 --- a/lib/CodeGen/CodeGenPrepare.cpp +++ b/lib/CodeGen/CodeGenPrepare.cpp @@ -790,6 +790,9 @@ void TaintRelaxedLoads(Instruction* UsageInst) { // condition. auto* BB = UsageInst->getParent(); auto* InsertPoint = UsageInst->getNextNode(); + while (dyn_cast(InsertPoint)) { + InsertPoint = InsertPoint->getNextNode(); + } IRBuilder Builder(InsertPoint); // First thing is to cast 'UsageInst' to an integer type if necessary. Value* AndTarget = nullptr;