[all-commits] [llvm/llvm-project] f0903d: [x86] Enable bypassing 64-bit division on generic ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Apr 29 08:57:24 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f0903de1aa7a77a1d1cf9ecdf17e0c16ca135eaa
      https://github.com/llvm/llvm-project/commit/f0903de1aa7a77a1d1cf9ecdf17e0c16ca135eaa
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-04-29 (Wed, 29 Apr 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86.td
    M llvm/test/CodeGen/X86/bypass-slow-division-tune.ll

  Log Message:
  -----------
  [x86] Enable bypassing 64-bit division on generic x86-64

This is currently enabled for Intel big cores from Sandy Bridge onward, as well as Atom, Silvermont, and KNL, due to 64-bit division being so slow on these cores. AMD cores can do this in hardware (use 32-bit division based on input operand width), so it's not a win there. But since the majority of x86 CPUs benefit from this optimization, and since the potential upside is significantly greater than the downside, we should enable this for the generic x86-64 target.

Patch By: @atdt

Reviewed By: @craig.topper, @RKSimon

Differential Revision: https://reviews.llvm.org/D75567




More information about the All-commits mailing list