[llvm] [NVPTX] Constant-folding for f2i, d2ui, f2ll etc. (PR #118965)
Lewis Crawford via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 13 03:55:53 PST 2024
LewisCrawford wrote:
> I can't say if it's okay to add so much target-specific code here.
Currently, ConstantFolding.cpp has target-specific code for WebAssembly, AArch64, x86, and AMDGPU intrinsics, so adding target-specific intrinsics to this file looks like the current status quo.
However, the NVPTX backend has an abnormally large number of constant-foldable target-specific intrinsics (the 48 float-to-int conversion intrinsics covered in patch are just the tip of the ice-berg), so it may be reasonable to split them into a separate NVVM-specific file if anyone objects to adding them to the main ConstantFolding.cpp file.
https://github.com/llvm/llvm-project/pull/118965
More information about the llvm-commits
mailing list