Issue 171263
Summary [clang] Add `__builtin_fmaximum` which lowers to `llvm.maximum`
Labels clang
Assignees
Reporter eisenwave
    This is a feature request.

Currently, there exists a `__builtin_fmax` and a `__builtin_fmaximum_num` to implement the corresponding `<math.h>` functions, but there exists no `__builtin_fmaximum`.

Such a portable builtin would be quite useful:
- it implements `fmaximum` / `std::fmaximum` directly
- it already has a portable `llvm.maximum` intrinsic backing it
- on WASM, it lowers to a single `f32.max` or `f64.max` instruction
- on ARMv8, I think it lowers directly to `fmax`, though I'd need to double-check that
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to