Skip to content

Commit b7fef1e

Browse files
committed
address comments
1 parent a35492e commit b7fef1e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
10481048

10491049
// PTX support for 16-bit CAS is emulated. Only use 32+
10501050
setMinCmpXchgSizeInBits(STI.getMinCmpXchgSizeInBits());
1051-
setMaxAtomicSizeInBitsSupported(128);
1051+
setMaxAtomicSizeInBitsSupported(STI.hasAtomSwap128() ? 128 : 64);
10521052
setMaxDivRemBitWidthSupported(64);
10531053

10541054
// Custom lowering for tcgen05.ld vector operands

llvm/test/CodeGen/NVPTX/atomics-b128.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
target triple = "nvptx64-nvidia-cuda"
1111

1212
;; Check that the first couple of error messages are correct.
13-
; ERROR: error: <unknown>:0:0: in function test_xchg_generic i128 (ptr, i128): Support for b128 atomics introduced in PTX ISA version 8.3 and requires target sm_90.
14-
; ERROR: error: <unknown>:0:0: in function test_xchg_global i128 (ptr addrspace(1), i128): Support for b128 atomics introduced in PTX ISA version 8.3 and requires target sm_90.
13+
; ERROR: error: unsupported cmpxchg
14+
; ERROR: error: unsupported cmpxchg
1515

1616
define i128 @test_xchg_generic(ptr %addr, i128 %amt) {
1717
; CHECK-LABEL: test_xchg_generic(

0 commit comments

Comments
 (0)