[all-commits] [llvm/llvm-project] a67f43: [NVPTX] Add range attributes for cluster rank intr...
Daniel Donenfeld via All-commits
all-commits at lists.llvm.org
Wed Sep 30 14:39:42 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a67f4353a08c319a7fef6da1cc0dc9f24e22fa10
https://github.com/llvm/llvm-project/commit/a67f4353a08c319a7fef6da1cc0dc9f24e22fa10
Author: Daniel Donenfeld <ddonenfeld at nvidia.com>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M llvm/include/llvm/IR/IntrinsicsNVVM.td
M llvm/test/CodeGen/NVPTX/intr-range.ll
A llvm/test/Transforms/InstCombine/NVPTX/intrinsic-range.ll
Log Message:
-----------
[NVPTX] Add range attributes for cluster rank intrinsics to preserve signed non-negativity (#224727)
Adds `range` properties in `IntrinsicsNVVM.td` for:
* `llvm.nvvm.read.ptx.sreg.cluster.ctarank`
* `llvm.nvvm.read.ptx.sreg.cluster.nctarank`
The CTA rank is encoded in a single byte within a shared pointer, so the
max value of ctarank is 255 and the number of CTAs is one greater. This
enables InstCombine to apply signed-division optimizations (e.g. sdiv X,
16 -\> shift-based form) that require X \>= 0.
---------
Co-authored-by: Alex MacLean <amaclean at nvidia.com>
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