[PATCH] D110579: [AMDGPU] Add two new intrinsics to control fp_trunc rounding mode
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 19 15:04:44 PDT 2021
arsenm added inline comments.
================
Comment at: llvm/include/llvm/IR/Intrinsics.td:914
+// Trunc a floating point number with a -inf rounding
+def int_experimental_fptrunc_round_downward : DefaultAttrsIntrinsic<[ llvm_anyfloat_ty ],
+ [ llvm_anyfloat_ty ]>;
----------------
Would it be better to have a metadata argument for the rounding mode like the constrained intrinsics? The verifier could disallow the unknown mode type
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:4500-4502
+ case Intrinsic::experimental_fptrunc_round_upward:
+ case Intrinsic::experimental_fptrunc_round_downward: {
+ unsigned Bank =
----------------
The backend should not directly consume generic intrinsics. These need to be routed through a generic opcode which is subject to normal legalization
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110579/new/
https://reviews.llvm.org/D110579
More information about the llvm-commits
mailing list