summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp
diff options
context:
space:
mode:
authorPuyan Lotfi <puyan@puyan.org>2019-05-31 17:34:25 +0000
committerPuyan Lotfi <puyan@puyan.org>2019-05-31 17:34:25 +0000
commit3ea6b24f41471358a51134f71177bc7caa2eacfc (patch)
tree15e225dc35676497408de876b1d0436978677df9 /llvm/lib/CodeGen/MIRCanonicalizerPass.cpp
parent312f3a2bbf45ab2c0cbbbc9ad04fb5d4c0517aaf (diff)
downloadbcm5719-llvm-3ea6b24f41471358a51134f71177bc7caa2eacfc.tar.gz
bcm5719-llvm-3ea6b24f41471358a51134f71177bc7caa2eacfc.zip
[MIR-Canon] Don't do vreg skip for independent instructions if there are none.
We don't want to create vregs if there is nothing to use them for. That causes verifier errors. Differential Revision: https://reviews.llvm.org/D62740 llvm-svn: 362247
Diffstat (limited to 'llvm/lib/CodeGen/MIRCanonicalizerPass.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRCanonicalizerPass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp b/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp
index a4097232d7d..c7d1131d7b8 100644
--- a/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp
+++ b/llvm/lib/CodeGen/MIRCanonicalizerPass.cpp
@@ -743,7 +743,8 @@ static bool runOnBasicBlock(MachineBasicBlock *MBB,
// of the MachineBasicBlock so that they are named in the order that we sorted
// them alphabetically. Eventually we wont need SkipVRegs because we will use
// named vregs instead.
- NVC.SkipVRegs();
+ if (IdempotentInstCount)
+ NVC.SkipVRegs();
auto MII = MBB->begin();
for (unsigned i = 0; i < IdempotentInstCount && MII != MBB->end(); ++i) {
OpenPOWER on IntegriCloud