From d14196bdd9747df44cc29e27cc447ae7f8af9a8d Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Tue, 14 Jun 2016 12:47:18 +0000 Subject: [PATCH] [MergedLoadStoreMotion] Before quering AA verify the loads are the same. Basicaa stats show the number of queries in Spec2k6 are reduced by 4540 or ~.67% overall. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272661 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/MergedLoadStoreMotion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp b/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp index 12ee3d8da6a..37a4bfda39b 100644 --- a/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp +++ b/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp @@ -199,7 +199,7 @@ static LoadInst *canHoistFromBlock(BasicBlock *BB1, LoadInst *Load0, MemoryLocation Loc0 = MemoryLocation::get(Load0); MemoryLocation Loc1 = MemoryLocation::get(Load1); - if (AA->isMustAlias(Loc0, Loc1) && Load0->isSameOperationAs(Load1) && + if (Load0->isSameOperationAs(Load1) && AA->isMustAlias(Loc0, Loc1) && !isLoadHoistBarrierInRange(BB1->front(), *Load1, Load1, SafeToLoadUnconditionally, AA) && !isLoadHoistBarrierInRange(BB0->front(), *Load0, Load0, -- 2.50.1