[PATCH] D46010: [AArch64] Improve cost of vector division by constant
Adhemerval Zanella via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 24 06:46:28 PDT 2018
zatrazz created this revision.
zatrazz added reviewers: fhahn, rengolin, javed.absar, huntergr, SjoerdMeijer, t.p.northover, echristo, evandro.
Herald added a subscriber: kristof.beyls.
With custom lowering for vector MULLH{S,U} [1], it is now profitable to
vectorize a divide by constant loop for the custom types (v16i8, v8i16,
and v4i32). The cost if based on TargetLowering::Build{S,U}DIV which
uses a multiply by constant plus adjustment to express a divide by
constant.
Both {u,s}mull{2} are expressed as Instruction::Mul and shifts by
Instruction::AShr.
[1] With custom lowering for vector MULLH{S,U}, it is now profitable to
vectorize a divide by constant loop for the custom types (v16i8, v8i16,
and v4i32). The cost if based on TargetLowering::Build{S,U}DIV which
uses a multiply by constant plus adjustment to express a divide by
constant.
Both {u,s}mull{2} are expressed as Instruction::Mul and shifts by
Instruction::AShr.
Repository:
rL LLVM
https://reviews.llvm.org/D46010
Files:
include/llvm/CodeGen/BasicTTIImpl.h
lib/Target/AArch64/AArch64TargetTransformInfo.cpp
test/Analysis/CostModel/AArch64/div_cte.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46010.143730.patch
Type: text/x-patch
Size: 5240 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180424/ad330cbf/attachment.bin>
More information about the llvm-commits
mailing list