[llvm] r321391 - [DAG] Add missing case check from findbaseoffset merge from r321389.
Nirav Dave via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 22 14:06:57 PST 2017
Author: niravd
Date: Fri Dec 22 14:06:56 2017
New Revision: 321391
URL: http://llvm.org/viewvc/llvm-project?rev=321391&view=rev
Log:
[DAG] Add missing case check from findbaseoffset merge from r321389.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=321391&r1=321390&r2=321391&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Dec 22 14:06:56 2017
@@ -17453,8 +17453,10 @@ bool DAGCombiner::isAlias(LSBaseSDNode *
bool IsCV0 = isa<ConstantPoolSDNode>(BasePtr0.getBase());
bool IsCV1 = isa<ConstantPoolSDNode>(BasePtr1.getBase());
- // If of mismatched base types they do not alias.
- if (((IsFI0 != IsFI1) || (IsGV0 != IsGV1) || (IsCV0 != IsCV1)) &&
+ // If of mismatched base types or checkable indices we can check
+ // they do not alias.
+ if ((BasePtr0.getIndex() == BasePtr1.getIndex() || (IsFI0 != IsFI1) ||
+ (IsGV0 != IsGV1) || (IsCV0 != IsCV1)) &&
(IsFI0 || IsGV0 || IsCV0) && (IsFI1 || IsGV1 || IsCV1))
return false;
More information about the llvm-commits
mailing list