Skip to content

Commit f4157dd

Browse files
Add address space check
1 parent 6d26be2 commit f4157dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22569,7 +22569,8 @@ static SDValue foldToMaskedStore(StoreSDNode *Store, SelectionDAG &DAG,
2256922569
}
2257022570

2257122571
auto *Load = cast<LoadSDNode>(StoredVal.getOperand(LoadPos));
22572-
if (!Load->isSimple() || !ISD::isNormalLoad(Load))
22572+
if (!Load->isSimple() || !ISD::isNormalLoad(Load) ||
22573+
Load->getAddressSpace() != AddrSpace)
2257322574
return SDValue();
2257422575

2257522576
if (!Store->getChain().reachesChainWithoutSideEffects(LoadCh))

0 commit comments

Comments
 (0)