Skip to content

Commit 0a2b5b0

Browse files
committed
[NVPTX][Fix] Ensure the return value of 'activemask' is unsigned
Summary: The previous patch missed the `U` prefix, which caused the mask to be considered signed. This meant that conversions would incorrectly treat a full mask as a negative number and break things.
1 parent 0461448 commit 0a2b5b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/include/clang/Basic/BuiltinsNVPTX.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ BUILTIN(__nvvm_read_ptx_sreg_pm3, "i", "n")
159159

160160
BUILTIN(__nvvm_prmt, "UiUiUiUi", "")
161161
BUILTIN(__nvvm_exit, "v", "r")
162-
TARGET_BUILTIN(__nvvm_nanosleep, "vi", "n", AND(SM_70, PTX63))
162+
TARGET_BUILTIN(__nvvm_nanosleep, "vUi", "n", AND(SM_70, PTX63))
163163

164164
// Min Max
165165

@@ -638,7 +638,7 @@ TARGET_BUILTIN(__nvvm_vote_uni_sync, "bUib", "", PTX60)
638638
TARGET_BUILTIN(__nvvm_vote_ballot_sync, "UiUib", "", PTX60)
639639

640640
// Mask
641-
TARGET_BUILTIN(__nvvm_activemask, "i", "n", PTX62)
641+
TARGET_BUILTIN(__nvvm_activemask, "Ui", "n", PTX62)
642642

643643
// Match
644644
TARGET_BUILTIN(__nvvm_match_any_sync_i32, "UiUiUi", "", AND(SM_70,PTX60))

0 commit comments

Comments
 (0)