[bug] [nvcc] cicc dies with SIGILL lowering __nvvm_atom_add_gen_d for sm_120

Product: NVIDIA CUDA Toolkit 13.4 (nvcc V13.4.59, build cuda_13.4.r13.4/compiler.38657139_0), Linux x86-64 · Report channel: NVIDIA developer forums / bug portal (not GitHub)

What happens

Illegal instruction (core dumped)      # exit 132, from cicc (nvcc -v: "# --error 0x84 --")

A one-line device function calling the NVVM builtin __nvvm_atom_add_gen_d (generic
address-space atomic add on double) compiles for sm_80 and sm_90 but kills cicc with
SIGILL — the signature of an llvm_unreachable/trap in a release build — when the target
is sm_120. Optimisation level and -Xcicc -O0 make no difference; --cuda (frontend only)
does not reach the lowering.

Reproducer

__device__ void a(double b, double *c) { __nvvm_atom_add_gen_d(c, b); }
nvcc -arch=sm_120 --ptx -o /dev/null t.cu    # SIGILL in cicc
nvcc -arch=sm_90  --ptx -o /dev/null t.cu    # fine

The line is from clang’s own CodeGen/builtins-nvptx-ptx50.cu test, so the builtin is a
documented NVVM intrinsic spelling that clang also accepts.

Expected

Either lower the atomic for sm_120 as for sm_90, or reject the builtin for that target with
a diagnostic; an abort inside the compiler is neither.