[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-03-02 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D117887#3353653 , @jchlanda wrote: > I went with the web interface as described here: > https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface > > with `git diff -U99 ...` didn't want to bite the bu

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-03-02 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. Herald added a project: All. In D117887#3352079 , @tra wrote: > In D117887#3351257 , @jchlanda > wrote: > >> @tra thank you for landing the patches, it seems that the clang part >> (bui

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-03-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Missing clang-side changes have landed. Please check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117887/new/ https://reviews.llvm.org/D117887 ___ cfe-commits mailing list cfe-comm

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-03-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D117887#3351257 , @jchlanda wrote: > @tra thank you for landing the patches, it seems that the clang part (builtin > declarations and tests) have been dropped, only `llvm` dir changes made it > through. Is there any way I could f

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-03-01 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda marked an inline comment as done. jchlanda added a comment. @tra thank you for landing the patches, it seems that the clang part (builtin declarations and tests) have been dropped, only `llvm` dir changes made it through. Is there any way I could fix it (same goes for the other two patc

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-23 Thread Artem Belevich via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe0dc4ac28f00: [NVPTX] Expose float tys min, max, abs, neg as builtins (authored by jchlanda, committed by tra). Changed prior to commit: https://r

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-09 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda marked 2 inline comments as done. jchlanda added inline comments. Comment at: llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp:162 SimplifyAction(Instruction::BinaryOps BinaryOp, FtzRequirementTy FtzReq) : BinaryOp(BinaryOp), FtzRequirement(FtzReq) {} -

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp:162 SimplifyAction(Instruction::BinaryOps BinaryOp, FtzRequirementTy FtzReq) : BinaryOp(BinaryOp), FtzRequirement(FtzReq) {} jchlanda wrote: > tra wrote: > >

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-09 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added inline comments. Comment at: llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp:162 SimplifyAction(Instruction::BinaryOps BinaryOp, FtzRequirementTy FtzReq) : BinaryOp(BinaryOp), FtzRequirement(FtzReq) {} tra wrote: > The new 3-argu

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-09 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp:162 SimplifyAction(Instruction::BinaryOps BinaryOp, FtzRequirementTy FtzReq) : BinaryOp(BinaryOp), FtzRequirement(FtzReq) {} The new 3-argument constructor a

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-02 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. In D117887#3289481 , @jchlanda wrote: > `ptxas` is happy with asm generated from both `math-intrins-sm86-ptx72.ll` > and `math-intrins-sm80-ptx70.ll` Thank

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-02 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda marked 2 inline comments as done. jchlanda added inline comments. 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

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-02 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. In D117887#3262024 , @tra wrote: > > Please do check that the generated PTX does get assembled by ptxas. `ptxas` is happy with asm generated from both `math-intrins-sm86-ptx72.ll` and `math-intrins-sm80-ptx70.ll` Reposito

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-02 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda updated this revision to Diff 405161. jchlanda edited the summary of this revision. jchlanda added a comment. Added xorsign.abs variant and test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117887/new/ https://reviews.llvm.org/D117887 F

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-02-01 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. In D117887#3262024 , @tra wrote: > > If you only intended to add instructions available in PTX-7.0, which, based > on the constraints used in the patch, appears to be the case, I'd mention > that in the commit log. Yeap, w

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-01-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Looks good overall. Please do check that the generated PTX does get assembled by ptxas. There are few newer variants of these instructions that appear to be missing. E.g. `{min/max}.xorsign.abs`. If you only intended to add instructions available in PTX-7.0, which, based o

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-01-21 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda created this revision. jchlanda added reviewers: csigg, tra, bkramer. Herald added subscribers: asavonic, hiraditya, jholewinski. jchlanda requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, jdoerfert. Herald added projects: clang, LLVM. Adds support fo