[PATCH] D135991: [AArch64] Fix cost model for `udiv` instruction when one of the operands is a uniform constant

Zain Jaffal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 14 14:17:13 PDT 2022


zjaffal created this revision.
zjaffal added reviewers: hassnaa-arm, david-arm, dmgreen, fhahn.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
zjaffal requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently the model over estimates the cost of a udiv instruction with one constant. The correct cost for a udiv instruction is
insert_cost * extract_cost * num_elements


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135991

Files:
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/test/Analysis/CostModel/AArch64/div.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135991.467910.patch
Type: text/x-patch
Size: 30218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221014/4738d051/attachment.bin>


More information about the llvm-commits mailing list