Skip to content

Commit c3ee9d0

Browse files
committed
Fixups
1 parent b2b304d commit c3ee9d0

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2562,23 +2562,24 @@ bool SelectionDAG::expandMultipleResultFPLibCall(
25622562
auto *ST = cast<StoreSDNode>(User);
25632563
SDValue StoreValue = ST->getValue();
25642564
unsigned ResNo = StoreValue.getResNo();
2565+
// Ensure the store corresponds to an output pointer.
2566+
if (CallRetResNo == ResNo)
2567+
continue;
2568+
// Ensure the store to the default address space and not atomic or volatile.
2569+
if (!ST->isSimple() || ST->getAddressSpace() != 0)
2570+
continue;
2571+
// Ensure all store chains are the same (so they don't alias).
2572+
if (StoresInChain && ST->getChain() != StoresInChain)
2573+
continue;
2574+
// Ensure the store is properly aligned.
25652575
Type *StoreType = StoreValue.getValueType().getTypeForEVT(Ctx);
2566-
if (
2567-
// Ensure the store corresponds to an output pointer.
2568-
CallRetResNo == ResNo ||
2569-
// Ensure the store is not atomic or volatile.
2570-
!ST->isSimple() ||
2571-
// Ensure the store is in the default address space.
2572-
ST->getAddressSpace() != 0 ||
2573-
// Ensure the store is properly aligned.
2574-
ST->getAlign() <
2575-
getDataLayout().getABITypeAlign(StoreType->getScalarType()) ||
2576-
// Ensure all store chains are the same (so they don't alias).
2577-
(StoresInChain && ST->getChain() != StoresInChain) ||
2578-
// Avoid:
2579-
// 1. Creating cyclic dependencies.
2580-
// 2. Expanding the node to a call within a call sequence.
2581-
!canFoldStoreIntoLibCallOutputPointers(ST, Node))
2576+
if (ST->getAlign() <
2577+
getDataLayout().getABITypeAlign(StoreType->getScalarType()))
2578+
continue;
2579+
// Avoid:
2580+
// 1. Creating cyclic dependencies.
2581+
// 2. Expanding the node to a call within a call sequence.
2582+
if (!canFoldStoreIntoLibCallOutputPointers(ST, Node))
25822583
continue;
25832584
ResultStores[ResNo] = ST;
25842585
StoresInChain = ST->getChain();

0 commit comments

Comments
 (0)