From 476be375a152bcdd67acd61d590aeef87449d548 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 25 Sep 2015 22:06:19 +0000 Subject: [PATCH] DAGCombiner: Check if store is volatile first This is the simpler check. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248625 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 01ca2884d03..f94f506156c 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -14519,6 +14519,9 @@ bool DAGCombiner::findBetterNeighborChains(StoreSDNode* St) { if (Index != St && !SDValue(Index, 0)->hasOneUse()) break; + if (Index->isVolatile() || Index->isIndexed()) + break; + // Find the base pointer and offset for this memory node. BaseIndexOffset Ptr = BaseIndexOffset::match(Index->getBasePtr()); @@ -14526,9 +14529,6 @@ bool DAGCombiner::findBetterNeighborChains(StoreSDNode* St) { if (!Ptr.equalBaseIndex(BasePtr)) break; - if (Index->isVolatile() || Index->isIndexed()) - break; - // Find the next memory operand in the chain. If the next operand in the // chain is a store then move up and continue the scan with the next // memory operand. If the next operand is a load save it and use alias -- 2.34.1