[llvm] r272661 - [MergedLoadStoreMotion] Before quering AA verify the loads are the same.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 05:47:19 PDT 2016


Author: mcrosier
Date: Tue Jun 14 07:47:18 2016
New Revision: 272661

URL: http://llvm.org/viewvc/llvm-project?rev=272661&view=rev
Log:
[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.

Modified:
    llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp?rev=272661&r1=272660&r2=272661&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp Tue Jun 14 07:47:18 2016
@@ -199,7 +199,7 @@ static LoadInst *canHoistFromBlock(Basic
 
     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,




More information about the llvm-commits mailing list