diff options
| author | Hal Finkel <hfinkel@anl.gov> | 2013-09-15 02:19:49 +0000 |
|---|---|---|
| committer | Hal Finkel <hfinkel@anl.gov> | 2013-09-15 02:19:49 +0000 |
| commit | 31658834e67e837ee8940ca1798c42b9296e747a (patch) | |
| tree | 27af2eb184887cc349b9787e708e66d5dae4439a /llvm/lib/CodeGen/SelectionDAG | |
| parent | 655531521eb499c8313d2b5450fa257123a46a52 (diff) | |
| download | bcm5719-llvm-31658834e67e837ee8940ca1798c42b9296e747a.tar.gz bcm5719-llvm-31658834e67e837ee8940ca1798c42b9296e747a.zip | |
Prevent assert in CombinerGlobalAA with null values
DAGCombiner::isAlias can be called with SrcValue1 or SrcValue2 null, and we
can't use AA in this case (if we try, then the casting code in AA will assert).
llvm-svn: 190763
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 144c6943f1d..67f3f0643e4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -10236,7 +10236,7 @@ bool DAGCombiner::isAlias(SDValue Ptr1, int64_t Size1, bool UseAA = CombinerGlobalAA.getNumOccurrences() > 0 ? CombinerGlobalAA : TLI.getTargetMachine().getSubtarget<TargetSubtargetInfo>().useAA(); - if (UseAA) { + if (UseAA && SrcValue1 && SrcValue2) { // Use alias analysis information. int64_t MinOffset = std::min(SrcValueOffset1, SrcValueOffset2); int64_t Overlap1 = Size1 + SrcValueOffset1 - MinOffset; |

