[all-commits] [llvm/llvm-project] 4a8c13: [CostModel] Add basic fptoi_sat costs
David Green via All-commits
all-commits at lists.llvm.org
Wed Apr 27 01:30:14 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4a8c13a6f42e9c58af64421790509cc58208859b
https://github.com/llvm/llvm-project/commit/4a8c13a6f42e9c58af64421790509cc58208859b
Author: David Green <david.green at arm.com>
Date: 2022-04-27 (Wed, 27 Apr 2022)
Changed paths:
M llvm/include/llvm/CodeGen/BasicTTIImpl.h
M llvm/test/Analysis/CostModel/AArch64/fptoi_sat.ll
M llvm/test/Analysis/CostModel/ARM/fptoi_sat.ll
M llvm/test/Analysis/CostModel/X86/fptoi_sat.ll
Log Message:
-----------
[CostModel] Add basic fptoi_sat costs
This adds some basic fptosi_sat and fptoui_sat target independent cost
modelling. The fptosi_sat is modelled as a fmin/fmax to saturate the
value, followed by a fp convert. The signed values then have an
additional fcmp+select for handling Nan correctly.
The AArch64/Arm costs may be more incorrect, as the instruction exist
natively. This can be fixed with target specific cost updates.
Differential Revision: https://reviews.llvm.org/D124269
More information about the All-commits
mailing list