[PATCH] D131967: [RISCV] Correct costs for vector ceil/floor/trunc/round
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 17 07:48:53 PDT 2022
reames added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:262
+ {Intrinsic::floor, MVT::v16f32, 16},
+ {Intrinsic::floor, MVT::nxv2f32, 15},
+ {Intrinsic::floor, MVT::nxv4f32, 16},
----------------
Miss_Grape wrote:
> Add v8f16 for floor
> ```
> Intrinsic::floor, MVT::v8f16, 14
> ```
>
Half type is not included in this patch at all. It can be added separately.
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:290
+ {Intrinsic::ceil, MVT::nxv8f64, 16},
+ {Intrinsic::trunc, MVT::v2f32, 8},
+ {Intrinsic::trunc, MVT::v4f32, 8},
----------------
Miss_Grape wrote:
> why set 8? Isn't it 7 ???
> {F24180940}
Good catch, I had a bug in my script. I was only discounting the vsetvli if it started with vsetv prefix. This uses the vsetivli variant. Will upload a corrected patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131967/new/
https://reviews.llvm.org/D131967
More information about the llvm-commits
mailing list