summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMikael Holmen <mikael.holmen@ericsson.com>2017-10-04 06:39:22 +0000
committerMikael Holmen <mikael.holmen@ericsson.com>2017-10-04 06:39:22 +0000
commit75b1992f78625c7c67219aa9b41a267580c07aab (patch)
treeb6799f76321f94ff899dacf516c111fe0cc00f61 /llvm/lib
parent65eb2f394cd8ee7aaee0ea9b5e0ed76407347f30 (diff)
downloadbcm5719-llvm-75b1992f78625c7c67219aa9b41a267580c07aab.tar.gz
bcm5719-llvm-75b1992f78625c7c67219aa9b41a267580c07aab.zip
Revert r314879 "[UnreachableBlockElim] Use COPY if PHI input is undef"
Build-bots broke on the new testcase. I'll investigate and fix. llvm-svn: 314880
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/UnreachableBlockElim.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/UnreachableBlockElim.cpp b/llvm/lib/CodeGen/UnreachableBlockElim.cpp
index bdd25f29aea..407fd9b162e 100644
--- a/llvm/lib/CodeGen/UnreachableBlockElim.cpp
+++ b/llvm/lib/CodeGen/UnreachableBlockElim.cpp
@@ -207,12 +207,11 @@ bool UnreachableMachineBlockElim::runOnMachineFunction(MachineFunction &F) {
MachineRegisterInfo &MRI = F.getRegInfo();
unsigned InputSub = Input.getSubReg();
if (InputSub == 0 &&
- MRI.constrainRegClass(InputReg, MRI.getRegClass(OutputReg)) &&
- !Input.isUndef()) {
+ MRI.constrainRegClass(InputReg, MRI.getRegClass(OutputReg))) {
MRI.replaceRegWith(OutputReg, InputReg);
} else {
// The input register to the PHI has a subregister or it can't be
- // constrained to the proper register class or it is undef:
+ // constrained to the proper register class:
// insert a COPY instead of simply replacing the output
// with the input.
const TargetInstrInfo *TII = F.getSubtarget().getInstrInfo();
OpenPOWER on IntegriCloud