[LoopVectorizer] call right function to get address space

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 06:49:30 PDT 2017


Ping!

Anyone agrees with me here?

/Jonas

diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index 30f7399..a624e0a 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7174,7 +7174,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);

On 2017-04-29 11:00, Jonas Paulsson wrote:
> Hi,
>
> It seems to me that the wrong function is being called here.
>
> /Jonas
>
>



More information about the llvm-commits mailing list