[all-commits] [llvm/llvm-project] 2b6e9d: [NVPTX] Set default value of nvptx-allow-ftz-atomi...

Artem Belevich via All-commits all-commits at lists.llvm.org
Fri Jul 17 11:12:30 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b6e9d261433f5ec8c49502f91d63dd7d07346c3
      https://github.com/llvm/llvm-project/commit/2b6e9d261433f5ec8c49502f91d63dd7d07346c3
  Author: Artem Belevich <tra at google.com>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
    M llvm/test/CodeGen/NVPTX/atomicrmw-allow-ftz-atomics.ll
    M llvm/test/CodeGen/NVPTX/atomicrmw-sm60.ll
    M llvm/test/CodeGen/NVPTX/atomicrmw-sm70.ll
    M llvm/test/CodeGen/NVPTX/atomicrmw-sm90.ll
    M llvm/test/CodeGen/NVPTX/atomicrmw.py
    M llvm/test/CodeGen/NVPTX/atomics.ll

  Log Message:
  -----------
  [NVPTX] Set default value of nvptx-allow-ftz-atomics to true (#206154)

This is a follow-up to https://github.com/llvm/llvm-project/pull/200732.

Setting the default value of nvptx-allow-ftz-atomics to true preserves
the status quo. It allows the NVPTX backend to emit native
floating-point atomic add instructions by default, rather than falling
back to the CAS loop required for strict FTZ compliance.

Correct FTZ handling forces a lot of existing code to emit CAS loops.
This introduces thread divergence, breaking code that relies on atomic
operations being non-divergent (for example, warp-wide atomic additions
followed by a load of the reduced value without explicit
synchronization).

While FTZ-correct atomic behavior is desirable as a long-term default,
introducing thread divergence into a common operation that previously
"happened to work" without synchronization is highly disruptive.
Defaulting to true makes the FTZ-correct behavior opt-in for now,
allowing users time to audit and adapt their code.

Test cases are updated to verify both enabled and disabled states of the
option, alongside the new default behavior.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list