[ARM] Attempt to fix ppc64be buildbot

llvm-svn: 345850
This commit is contained in:
Sam Parker 2018-11-01 16:44:45 +00:00
parent 0bca15a35a
commit 48fbf752b0
1 changed files with 3 additions and 2 deletions

View File

@ -633,7 +633,8 @@ void IRPromoter::TruncateSinks(SmallPtrSetImpl<Value*> &Sources,
LLVM_DEBUG(dbgs() << "ARM CGP: Creating " << *TruncTy << " Trunc for "
<< *V << "\n");
Builder.SetInsertPoint(cast<Instruction>(V));
auto *Trunc = cast<Instruction>(Builder.CreateTrunc(V, TruncTy));
auto *Trunc = dyn_cast<Instruction>(Builder.CreateTrunc(V, TruncTy));
if (Trunc)
NewInsts.insert(Trunc);
return Trunc;
};