[llvm] r302114 - Use right function in LoopVectorize.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 11:21:56 PDT 2017


On Wed, May 3, 2017 at 10:53 PM, Jonas Paulsson
<paulsson at linux.vnet.ibm.com> wrote:
>
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
>>> +++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Thu May  4
>>> 00:31:56 2017
>>> @@ -7178,7 +7178,7 @@ unsigned LoopVectorizationCostModel::get
>>>     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);
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>> Testcase?
>>
> This was something I just happened to notice, and I don't have any test
> case. We don't use address spaces on SystemZ... /Jonas
>
>

I understand. But this is a functional change, from what I understand,
so you should associate a test with it.
I'm not the biggest fan of checking in changes without tests associated.

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list