summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorJunmo Park <junmoz.park@samsung.com>2016-01-11 07:15:38 +0000
committerJunmo Park <junmoz.park@samsung.com>2016-01-11 07:15:38 +0000
commit7ceec0b82f11f8b785ca7a34a05c5e2a4e42ccb7 (patch)
tree1446afc0ca3e456c5977edb1857f0914ceeb4deb /llvm/lib/CodeGen/BranchFolding.cpp
parent4439631009e8e9b1dedd578a8d51cdc04efde21d (diff)
downloadbcm5719-llvm-7ceec0b82f11f8b785ca7a34a05c5e2a4e42ccb7.tar.gz
bcm5719-llvm-7ceec0b82f11f8b785ca7a34a05c5e2a4e42ccb7.zip
[BranchFolding] Set correct mem refs (2nd try)
This is a recommit of r257253 which was reverted in r257270. Previous testcase can make failure on some targets due to using opt with O3 option. Original Summary: Merge MBBICommon and MBBI's MMOs. Differential Revision: http://reviews.llvm.org/D15990 llvm-svn: 257317
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r--llvm/lib/CodeGen/BranchFolding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp
index 60803490a5d..df5cac5a9f7 100644
--- a/llvm/lib/CodeGen/BranchFolding.cpp
+++ b/llvm/lib/CodeGen/BranchFolding.cpp
@@ -780,7 +780,7 @@ removeMMOsFromMemoryOperations(MachineBasicBlock::iterator MBBIStartPos,
assert(MBBICommon->isIdenticalTo(&*MBBI) && "Expected matching MIIs!");
if (MBBICommon->mayLoad() || MBBICommon->mayStore())
- MBBICommon->setMemRefs(MBBI->mergeMemRefsWith(*MBBI));
+ MBBICommon->setMemRefs(MBBICommon->mergeMemRefsWith(*MBBI));
++MBBI;
++MBBICommon;
OpenPOWER on IntegriCloud