Skip to content

Commit 47bf70b

Browse files
Rohit AggarwalRohit Aggarwal
Rohit Aggarwal
authored and
Rohit Aggarwal
committed
Revert back the hasOne check
1 parent fb131f8 commit 47bf70b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12163,6 +12163,9 @@ bool refineUniformBase(SDValue &BasePtr, SDValue &Index, bool IndexIsScaled,
1216312163
if (IndexIsScaled)
1216412164
return false;
1216512165

12166+
if (!isNullConstant(BasePtr) && !Index.hasOneUse())
12167+
return false;
12168+
1216612169
EVT VT = BasePtr.getValueType();
1216712170

1216812171
if (SDValue SplatVal = DAG.getSplatValue(Index);

0 commit comments

Comments
 (0)