[all-commits] [llvm/llvm-project] b79b68: [NVPTX] Add commutativity to SETP instructions to ...
modiking via All-commits
all-commits at lists.llvm.org
Mon Apr 13 14:23:27 PDT 2026
Branch: refs/heads/users/modiking/nvptx-setp-predicate-inversion
Home: https://github.com/llvm/llvm-project
Commit: b79b68fefb1537d273e5e9779cc0fbb5ce4baf6e
https://github.com/llvm/llvm-project/commit/b79b68fefb1537d273e5e9779cc0fbb5ce4baf6e
Author: root <mmo at nvidia.com>
Date: 2026-04-13 (Mon, 13 Apr 2026)
Changed paths:
M llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp
M llvm/lib/Target/NVPTX/NVPTXInstrInfo.h
M llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion-bfloat16.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion-float16.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion-float32.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion-float64.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion-int16.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion-int32.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion-int64.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion-multiple-users.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-inversion-vector-float.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-no-inversion-bfloat16.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-no-inversion-float16.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-no-inversion-float32.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-no-inversion-float64.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-no-inversion-int16.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-no-inversion-int32.ll
A llvm/test/CodeGen/NVPTX/machine-cse-predicate-no-inversion-int64.ll
Log Message:
-----------
[NVPTX] Add commutativity to SETP instructions to enable MachineCSE of inverted predicates
Inverted predicates can be used freely in PTX. If we can invert a
predicate and CSE the generating instruction we can save calculating
the inverse.
Teach the NVPTX commuteInstructionImpl that SETP instructions can be
inverted to allow CSEing with previous SETP that match the inverted
form. This also inverts the branch users of the predicate to maintain
correctness.
Currently only allow the SETP inversion if all users are branches.
Future work can extend this to sel and not instructions.
Made-with: Cursor
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