[LoopVectorizer] call right function to get address space

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 08:27:12 PDT 2017


On 05/03/2017 08:49 AM, Jonas Paulsson via llvm-commits wrote:
> Ping!
>
> Anyone agrees with me here?

Looks like an obvious fix to me. You don't need pre-commit review for 
this. As the developer's policy states, "You are allowed to commit 
patches without approval which you think are obvious. This is clearly a 
subjective decision — we simply expect you to use good judgement. 
Examples include: fixing build breakage, reverting obviously broken 
patches, documentation/comment changes, any other minor changes."

Regardless, LGTM.

  -Hal

>
> /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
>>
>>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list