[all-commits] [llvm/llvm-project] 6d41de: [ARM] Teach getIntImmCostInst about the cost of sa...

David Green via All-commits all-commits at lists.llvm.org
Wed Dec 1 02:26:04 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d41de380f223c8da02fd4d6a7f7dd1e7a404a24
      https://github.com/llvm/llvm-project/commit/6d41de380f223c8da02fd4d6a7f7dd1e7a404a24
  Author: David Green <david.green at arm.com>
  Date:   2021-12-01 (Wed, 01 Dec 2021)

  Changed paths:
    M llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
    M llvm/test/CodeGen/ARM/fpclamptosat.ll

  Log Message:
  -----------
  [ARM] Teach getIntImmCostInst about the cost of saturating fp converts

Given a min(max(fptosi, INT_MIN), INT_MAX) with the correct constants,
we can now generate a fptosi.sat. But in the arm backend, the constant
can be treated as high cost, pulling it out of the basic block in a way
that the DAG combine can no longer see it. This teaches it again that it
is a low cost constant, not worth hoisting out.

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




More information about the All-commits mailing list