To generate FMINM/FMAXM instructions in https://reviews.llvm.org/D143982, we need to use llvm intrinsics in IR files. Now I custom some corresponding builtins in BuiltinsRISCV.def to make sure these instructions can be generated from C codes.
In this implemention, crash mentioned in https://reviews.llvm.org/D144843 will not occur. These builtins can only work in riscv with specific extension.
Details
Details
- Reviewers
craig.topper reames
Diff Detail
Diff Detail
Event Timeline
clang/include/clang/Basic/BuiltinsRISCV.def | ||
---|---|---|
85 | as noted in Builtins.def, the letter for _Float16 is 'x' not 'h' // x -> half (_Float16) |
Comment Actions
Update builtin_riscv_fmaxm_f/builtin_riscv_fminm_f to builtin_riscv_fmaxm_s/builtin_riscv_fminm_s
clang/lib/CodeGen/CGBuiltin.cpp | ||
---|---|---|
2366 | This needs to be in the RISC-V specific function EmitRISCVBuiltinExpr. |
RISC-V builtins should use RISC-V instruction names