summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-12-05 22:40:13 +0000
committerTim Northover <tnorthover@apple.com>2016-12-05 22:40:13 +0000
commitb566848d68b43e94948b79dad4a338770da205c9 (patch)
tree0dfac9f1841321743d3b43dc65cd34723d94d42d /llvm/lib
parentd207c378064f249a6a4f71e85d6968035b0780c9 (diff)
downloadbcm5719-llvm-b566848d68b43e94948b79dad4a338770da205c9.tar.gz
bcm5719-llvm-b566848d68b43e94948b79dad4a338770da205c9.zip
GlobalISel: place constants correctly in the entry block.
When the entry block was empty after arg lowering, we were always placing constants at the end. This is probably hamrless while translating the same block, but horribly wrong once its terminator has been translated. So switch to inserting at the beginning. llvm-svn: 288720
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 1c0020ee693..68fec1a555f 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -766,7 +766,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) {
// Now that we've got the ABI handling code, it's safe to set a location for
// any Constants we find in the IR.
if (MBB.empty())
- EntryBuilder.setMBB(MBB);
+ EntryBuilder.setMBB(MBB, /* Beginning */ true);
else
EntryBuilder.setInstr(MBB.back(), /* Before */ false);
OpenPOWER on IntegriCloud