[PATCH] D48980: [CostModel][X86] Add SREM/UREM general and constant costs (PR38056)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 5 10:22:09 PDT 2018


RKSimon created this revision.
RKSimon added reviewers: craig.topper, ABataev, spatel.

We penalize general SDIV/UDIV costs but don't do the same for SREM/UREM.

This patch makes general vector SREM/UREM x20 as costly as scalar, the same approach as we do for SDIV/UDIV. The patch also extends the existing SDIV/UDIV constant costs for SREM/UREM - at the moment this means the additional cost of a MUL+SUB (see https://reviews.llvm.org/D48975).


Repository:
  rL LLVM

https://reviews.llvm.org/D48980

Files:
  lib/Target/X86/X86TargetTransformInfo.cpp
  test/Analysis/CostModel/X86/rem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48980.154260.patch
Type: text/x-patch
Size: 186717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180705/3e4fd273/attachment-0001.bin>


More information about the llvm-commits mailing list