diff options
| author | Philip Reames <listmail@philipreames.com> | 2019-05-06 22:09:31 +0000 | 
|---|---|---|
| committer | Philip Reames <listmail@philipreames.com> | 2019-05-06 22:09:31 +0000 | 
| commit | 2f53d79bff7aa1da5b52c32fec154c0f84984162 (patch) | |
| tree | 4fc5edc5c8d06c2080f589dbf5d5fe7cc0e771ec /llvm/lib/CodeGen/SelectionDAG | |
| parent | 415da713559472a24ff41a36cfa69292317087d3 (diff) | |
| download | bcm5719-llvm-2f53d79bff7aa1da5b52c32fec154c0f84984162.tar.gz bcm5719-llvm-2f53d79bff7aa1da5b52c32fec154c0f84984162.zip | |
Fix pr33010, a 2 year old crashing regression
The problem was that we were creating a CMOV64rr <TargetFrameIndex>, <TargetFrameIndex>.  The entire point of a TFI is that address code is not generated, so there's no way to legalize/lower this.  Instead, simply prevent it's creation.
Arguably, we shouldn't be using *Target*FrameIndices in StatepointLowering at all, but that's a much deeper change.  
llvm-svn: 360090
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 9a32ca51db4..c23469e166b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -19008,6 +19008,10 @@ bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,          // locations are not in the default address space.          LLD->getPointerInfo().getAddrSpace() != 0 ||          RLD->getPointerInfo().getAddrSpace() != 0 || +        // We can't produce a CMOV of a TargetFrameIndex since we won't +        // generate the address generation required. +        LLD->getBasePtr().getOpcode() == ISD::TargetFrameIndex || +        RLD->getBasePtr().getOpcode() == ISD::TargetFrameIndex ||          !TLI.isOperationLegalOrCustom(TheSelect->getOpcode(),                                        LLD->getBasePtr().getValueType()))        return false; | 

