Use right function in LoopVectorize.

-    unsigned AS = getMemInstAlignment(I);
+    unsigned AS = getMemInstAddressSpace(I);

Review: Hal Finkel
llvm-svn: 302114
This commit is contained in:
Jonas Paulsson 2017-05-04 05:31:56 +00:00
parent d9fadb2de8
commit 8bf1fdcc91
1 changed files with 1 additions and 1 deletions

View 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);