summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-07-15 02:22:46 +0000
committerJuergen Ributzka <juergen@apple.com>2014-07-15 02:22:46 +0000
commit718bb71ade3a37552aa5f99a313d17554d4cda42 (patch)
treeda1cefb37ab5c614363c1cdb63871e5c6e027c07 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
parenta41594359084b9fba0829ddc1b591d8f237350f0 (diff)
downloadbcm5719-llvm-718bb71ade3a37552aa5f99a313d17554d4cda42.tar.gz
bcm5719-llvm-718bb71ade3a37552aa5f99a313d17554d4cda42.zip
[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
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 0cd5facbb5e..885137302d3 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)
OpenPOWER on IntegriCloud