[llvm] [NVPTX] Add patterns for fma.relu.{f16|f16x2|bf16|bf16x2} (PR #114977)
Fraser Cormack via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 08:52:34 PST 2024
================
@@ -3917,3 +3903,52 @@ def atomic_thread_fence_seq_cst_cta :
def atomic_thread_fence_acq_rel_cta :
NVPTXInst<(outs), (ins), "fence.acq_rel.cta;", []>,
Requires<[hasPTX<60>, hasSM<70>]>;
+
+def fpimm_any_zero : FPImmLeaf<fAny, [{
+ return Imm.isExactlyValue(+0.0) | Imm.isExactlyValue(-0.0);
----------------
frasercrmck wrote:
This might give a warning about bitwise orbeing used instead of logical or. I'd suggest using `||`.
Alternatively, perhaps `Imm.isExactlyValue(+0.0) | Imm.isExactlyValue(-0.0)` is just `Imm.isZero()`?
https://github.com/llvm/llvm-project/pull/114977
More information about the llvm-commits
mailing list