OSDN Git Service

Use right function in LoopVectorize.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 4 May 2017 05:31:56 +0000 (05:31 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 4 May 2017 05:31:56 +0000 (05:31 +0000)
-    unsigned AS = getMemInstAlignment(I);
+    unsigned AS = getMemInstAddressSpace(I);

Review: Hal Finkel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302114 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Vectorize/LoopVectorize.cpp

index 87ce019..3fde0a4 100644 (file)
@@ -7178,7 +7178,7 @@ unsigned LoopVectorizationCostModel::getMemoryInstructionCost(Instruction *I,
   if (VF == 1) {
     Type *ValTy = getMemInstValueType(I);
     unsigned Alignment = getMemInstAlignment(I);
-    unsigned AS = getMemInstAlignment(I);
+    unsigned AS = getMemInstAddressSpace(I);
 
     return TTI.getAddressComputationCost(ValTy) +
            TTI.getMemoryOpCost(I->getOpcode(), ValTy, Alignment, AS, I);