summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2019-04-10 18:00:41 +0000
committerDavid Green <david.green@arm.com>2019-04-10 18:00:41 +0000
commit0861c87b06c5573d919ec550bbbd2a1624d22ba0 (patch)
tree99fec9561f6122cd38721bf5947e097a61ad7348 /llvm/lib/CodeGen
parent5f6eb1817af8d525ee93ac8a1f0cf9c881b3ebd3 (diff)
downloadbcm5719-llvm-0861c87b06c5573d919ec550bbbd2a1624d22ba0.tar.gz
bcm5719-llvm-0861c87b06c5573d919ec550bbbd2a1624d22ba0.zip
Revert rL357745: [SelectionDAG] Compute known bits of CopyFromReg
Certain optimisations from ConstantHoisting and CGP rely on Selection DAG not seeing through to the constant in other blocks. Revert this patch while we come up with a better way to handle that. I will try to follow this up with some better tests. llvm-svn: 358113
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index caa3f14b8a1..c017d6d6eae 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -31,7 +31,6 @@
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineMemOperand.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RuntimeLibcalls.h"
#include "llvm/CodeGen/SelectionDAGAddressAnalysis.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
@@ -3208,25 +3207,6 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
Known.One &= Known2.One;
break;
}
- case ISD::CopyFromReg: {
- auto R = cast<RegisterSDNode>(Op.getOperand(1));
- const unsigned Reg = R->getReg();
-
- const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo();
- if (!TRI->isVirtualRegister(Reg))
- break;
-
- const MachineRegisterInfo *MRI = &MF->getRegInfo();
- if (!MRI->hasOneDef(Reg))
- break;
-
- const FunctionLoweringInfo::LiveOutInfo *LOI = FLI->GetLiveOutRegInfo(Reg);
- if (!LOI || LOI->Known.getBitWidth() != BitWidth)
- break;
-
- Known = LOI->Known;
- break;
- }
case ISD::FrameIndex:
case ISD::TargetFrameIndex:
TLI->computeKnownBitsForFrameIndex(Op, Known, DemandedElts, *this, Depth);
OpenPOWER on IntegriCloud