From: Juergen Ributzka Date: Tue, 15 Jul 2014 02:22:46 +0000 (+0000) Subject: [FastISel] Insert patchpoint instruction before the target generated call instruction. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=718bb71ade3a37552aa5f99a313d17554d4cda42;p=platform%2Fupstream%2Fllvm.git [FastISel] Insert patchpoint instruction before the target generated call instruction. The patchpoint instruction should have been inserted before the target generated call instruction to be inside the ADJSTACKDOWN/ADJSTACKUP call sequence window. llvm-svn: 213034 --- diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 0cd5fac..88513730 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -826,7 +826,8 @@ bool FastISel::SelectPatchpoint(const CallInst *I) { Ops.push_back(MachineOperand::CreateReg(Reg, /*IsDef=*/true, /*IsImpl=*/true)); - MachineInstrBuilder MIB = BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, + // Insert the patchpoint instruction before the call generated by the target. + MachineInstrBuilder MIB = BuildMI(*FuncInfo.MBB, CLI.Call, DbgLoc, TII.get(TargetOpcode::PATCHPOINT)); for (auto &MO : Ops)