[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 2 10:18:21 PST 2022
tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.
In D117887#3289481 <https://reviews.llvm.org/D117887#3289481>, @jchlanda wrote:
> `ptxas` is happy with asm generated from both `math-intrins-sm86-ptx72.ll` and `math-intrins-sm80-ptx70.ll`
Thank you for checking that.
================
Comment at: clang/test/CodeGen/builtins-nvptx.c:822
+ // CHECK_PTX70_SM80: call i16 @llvm.nvvm.fmin.bf16
+ __nvvm_fmin_bf16(0x1234, 0x7FBF);
+ // CHECK_PTX70_SM80: call i16 @llvm.nvvm.fmin.nan.bf16
----------------
jchlanda wrote:
> tra wrote:
> > I'd `#define` the magic values to give them sensible names.
> I've added #defs for those values, they are not strictly needed (as in the values don't really matter) as this is not being executed, but I agree, it makes for a better read of the test.
I mostly had NaN/Inf in mind. Arbitrary numbers could remain literals. This is OK, too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117887/new/
https://reviews.llvm.org/D117887
More information about the cfe-commits
mailing list