[llvm-branch-commits] [clang] [clang][NVPTX] Emit !atomic.ignore.denormal.mode for CUDA atomics (PR #217587)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 20 04:25:42 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 56141 tests passed
* 1524 tests skipped
* 3 tests failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.CodeGenHIP/amdgpu-flat-atomic-fadd.hip</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -triple amdgpu9.42-amd-amdhsa -emit-llvm -fcuda-is-device C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -triple amdgpu9.42-amd-amdhsa -emit-llvm -fcuda-is-device 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip'
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -triple spirv64-amd-amdhsa -emit-llvm -fcuda-is-device C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefix=SPIRV C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -triple spirv64-amd-amdhsa -emit-llvm -fcuda-is-device 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --check-prefix=SPIRV 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:49:16: error: SPIRV-NEXT: expected string not found in input
# | // SPIRV-NEXT: [[TMP4:%.*]] = atomicrmw fadd ptr [[TMP2]], float [[TMP3]] syncscope("device") monotonic, align 4, !amdgpu.no.fine.grained.memory [[META5:![0-9]+]], !atomic.ignore.denormal.mode [[META5]]
# |                ^
# | <stdin>:30:61: note: scanning from here
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | <stdin>:30:61: note: with "TMP2" equal to "%2"
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | <stdin>:30:61: note: with "TMP3" equal to "%3"
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | <stdin>:30:61: note: pattern attempts to capture variables: "META5", "TMP4"
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:94:149: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP4:%.*]] = atomicrmw fadd ptr [[TMP2]], double [[TMP3]] syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory [[META5]]
# |                                                                                                                                                     ^
# | <stdin>:59:62: note: with "TMP2" equal to "%2"
# |  %3 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:59:62: note: with "TMP3" equal to "%3"
# |  %3 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:59:62: note: pattern attempts to capture variables: "TMP4"
# |  %3 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:60:2: note: possible intended match here
# |  %4 = atomicrmw fadd ptr %2, double %3 syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory !5
# |  ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:139:148: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP4:%.*]] = atomicrmw fadd ptr [[TMP2]], float [[TMP3]] syncscope("device") monotonic, align 4, !amdgpu.no.fine.grained.memory [[META5]], !atomic.ignore.denormal.mode [[META5]]
# |                                                                                                                                                    ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:139:188: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP4:%.*]] = atomicrmw fadd ptr [[TMP2]], float [[TMP3]] syncscope("device") monotonic, align 4, !amdgpu.no.fine.grained.memory [[META5]], !atomic.ignore.denormal.mode [[META5]]
# |                                                                                                                                                                                            ^
# | <stdin>:85:61: note: with "TMP2" equal to "%2"
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | <stdin>:85:61: note: with "TMP3" equal to "%3"
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | <stdin>:85:61: note: pattern attempts to capture variables: "TMP4"
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:184:149: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP4:%.*]] = atomicrmw fadd ptr [[TMP2]], double [[TMP3]] syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory [[META5]]
# |                                                                                                                                                     ^
# | <stdin>:111:62: note: with "TMP2" equal to "%2"
# |  %3 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:111:62: note: with "TMP3" equal to "%3"
# |  %3 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:111:62: note: pattern attempts to capture variables: "TMP4"
# |  %3 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:112:2: note: possible intended match here
# |  %4 = atomicrmw fadd ptr %2, double %3 syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory !5
# |  ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:220:192: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP2:%.*]] = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @const_float to ptr), float [[TMP1]] syncscope("device") monotonic, align 4, !amdgpu.no.fine.grained.memory [[META5]], !atomic.ignore.denormal.mode [[META5]]
# |                                                                                                                                                                                                ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:220:232: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP2:%.*]] = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @const_float to ptr), float [[TMP1]] syncscope("device") monotonic, align 4, !amdgpu.no.fine.grained.memory [[META5]], !atomic.ignore.denormal.mode [[META5]]
# |                                                                                                                                                                                                                                        ^
# | <stdin>:132:61: note: with "TMP1" equal to "%1"
# |  %1 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | <stdin>:132:61: note: pattern attempts to capture variables: "TMP2"
# |  %1 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:256:194: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP2:%.*]] = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @const_double to ptr), double [[TMP1]] syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory [[META5]]
# |                                                                                                                                                                                                  ^
# | <stdin>:153:62: note: with "TMP1" equal to "%1"
# |  %1 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:153:62: note: pattern attempts to capture variables: "TMP2"
# |  %1 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:154:2: note: possible intended match here
# |  %2 = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @const_double to ptr), double %1 syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory !5
# |  ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:292:193: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP2:%.*]] = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @global_float to ptr), float [[TMP1]] syncscope("device") monotonic, align 4, !amdgpu.no.fine.grained.memory [[META5]], !atomic.ignore.denormal.mode [[META5]]
# |                                                                                                                                                                                                 ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:292:233: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP2:%.*]] = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @global_float to ptr), float [[TMP1]] syncscope("device") monotonic, align 4, !amdgpu.no.fine.grained.memory [[META5]], !atomic.ignore.denormal.mode [[META5]]
# |                                                                                                                                                                                                                                         ^
# | <stdin>:174:61: note: with "TMP1" equal to "%1"
# |  %1 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | <stdin>:174:61: note: pattern attempts to capture variables: "TMP2"
# |  %1 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip:328:195: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP2:%.*]] = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @global_double to ptr), double [[TMP1]] syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory [[META5]]
# |                                                                                                                                                                                                   ^
# | <stdin>:195:62: note: with "TMP1" equal to "%1"
# |  %1 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:195:62: note: pattern attempts to capture variables: "TMP2"
# |  %1 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:196:2: note: possible intended match here
# |  %2 = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @global_double to ptr), double %1 syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory !5
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-flat-atomic-fadd.hip
# | 
# | -dump-input
# | ...
# `---data was truncated (10240/27680) (change limit with -D output_limit=N)
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang.CodeGenHIP/amdgpu-global-atomic-fadd.hip</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -triple amdgpu9.42-amd-amdhsa -emit-llvm -fcuda-is-device C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -triple amdgpu9.42-amd-amdhsa -emit-llvm -fcuda-is-device 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip'
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -triple spirv64-amd-amdhsa -emit-llvm -fcuda-is-device C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --check-prefix=SPIRV C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -triple spirv64-amd-amdhsa -emit-llvm -fcuda-is-device 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --check-prefix=SPIRV 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip:49:16: error: SPIRV-NEXT: expected string not found in input
# | // SPIRV-NEXT: [[TMP4:%.*]] = atomicrmw fadd ptr addrspace(1) [[TMP2]], float [[TMP3]] syncscope("device") monotonic, align 4, !amdgpu.no.fine.grained.memory [[META5:![0-9]+]], !atomic.ignore.denormal.mode [[META5]]
# |                ^
# | <stdin>:28:61: note: scanning from here
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | <stdin>:28:61: note: with "TMP2" equal to "%2"
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | <stdin>:28:61: note: with "TMP3" equal to "%3"
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | <stdin>:28:61: note: pattern attempts to capture variables: "META5", "TMP4"
# |  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4
# |                                                             ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip:104:162: error: undefined variable: META5
# | // SPIRV-NEXT: [[TMP4:%.*]] = atomicrmw fadd ptr addrspace(1) [[TMP2]], double [[TMP3]] syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory [[META5]]
# |                                                                                                                                                                  ^
# | <stdin>:60:62: note: with "TMP2" equal to "%2"
# |  %3 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:60:62: note: with "TMP3" equal to "%3"
# |  %3 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:60:62: note: pattern attempts to capture variables: "TMP4"
# |  %3 = load double, ptr addrspace(4) %val.addr.ascast, align 8
# |                                                              ^
# | <stdin>:61:2: note: possible intended match here
# |  %4 = atomicrmw fadd ptr addrspace(1) %2, double %3 syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory !5
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGenHIP\amdgpu-global-atomic-fadd.hip
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            23:  br i1 %0, label %if.then, label %if.end 
# |            24:  
# |            25: if.then: ; preds = %entry 
# |            26:  %1 = load ptr addrspace(4), ptr addrspace(4) %ptr.addr.ascast, align 8 
# |            27:  %2 = addrspacecast ptr addrspace(4) %1 to ptr addrspace(1) 
# |            28:  %3 = load float, ptr addrspace(4) %val.addr.ascast, align 4 
# | next:49'0                                                                 {   search range start (exclusive)
# | next:49'1                                                                     error: no match found in search range
# | next:49'2                                                                     with "TMP2" equal to "%2"
# | next:49'3                                                                     with "TMP3" equal to "%3"
# | next:49'4                                                                     pattern attempts to capture variables: "META5", "TMP4"
# |            29:  %4 = atomicrmw fadd ptr addrspace(1) %2, float %3 syncscope("device") monotonic, align 4, !atomic.ignore.denormal.mode !5, !amdgpu.no.fine.grained.memory !5 
# |            30:  store float %4, ptr addrspace(4) %result.ascast, align 4 
# |            31:  %5 = load float, ptr addrspace(4) %val.addr.ascast, align 4 
# |            32:  %6 = atomicrmw fadd ptr addrspace(1) @global_float, float %5 syncscope("device") monotonic, align 4, !atomic.ignore.denormal.mode !5, !amdgpu.no.fine.grained.memory !5 
# |            33:  store float %6, ptr addrspace(4) %result.ascast, align 4 
# |             .
# |             .
# |             .
# |            39:  
# |            40: ; Function Attrs: nounwind 
# |            41: declare i1 @llvm.spv.named.boolean.spec.constant(i32 immarg, i1 immarg, metadata) addrspace(4) #1 
# |            42:  
# |            43: ; Function Attrs: convergent mustprogress noinline nounwind optnone 
# |            44: define spir_func void @_Z33test_global_atomic_fadd_f64_validPdd(ptr addrspace(4) noundef %ptr, double noundef %val) addrspace(4) #0 { 
# | next:49'5                                                                      }                                                                       search range end (exclusive)
# |            45: entry: 
# |            46:  %ptr.addr = alloca ptr addrspace(4), align 8 
# |            47:  %val.addr = alloca double, align 8 
# |            48:  %result = alloca double, align 8 
# |            49:  %ptr.addr.ascast = addrspacecast ptr %ptr.addr to ptr addrspace(4) 
# |             .
# |             .
# |             .
# |            55:  br i1 %0, label %if.then, label %if.end 
# |            56:  
# |            57: if.then: ; preds = %entry 
# |            58:  %1 = load ptr addrspace(4), ptr addrspace(4) %ptr.addr.ascast, align 8 
# |            59:  %2 = addrspacecast ptr addrspace(4) %1 to ptr addrspace(1) 
# |            60:  %3 = load double, ptr addrspace(4) %val.addr.ascast, align 8 
# | next:104'0                                                                 {   search range start (exclusive)
# | next:104'1                                                                     error: match failed for invalid pattern
# | next:104'2                                                                     undefined variable: META5
# | next:104'3                                                                     with "TMP2" equal to "%2"
# | next:104'4                                                                     with "TMP3" equal to "%3"
# | next:104'5                                                                     pattern attempts to capture variables: "TMP4"
# |            61:  %4 = atomicrmw fadd ptr addrspace(1) %2, double %3 syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory !5 
# | next:104'6      ?                                                                                                                              possible intended match
# |            62:  store double %4, ptr addrspace(4) %result.ascast, align 8 
# |            63:  %5 = load double, ptr addrspace(4) %val.addr.ascast, align 8 
# |            64:  %6 = atomicrmw fadd ptr addrspace(1) @global_double, double %5 syncscope("device") monotonic, align 8, !amdgpu.no.fine.grained.memory !5 
# |            65:  store double %6, ptr addrspace(4) %result.ascast, align 8 
# |            66:  br label %if.end 
# |             .
# |             .
# |             .
# |            80: !1 = !{i32 1, !"amdgpu_printf_kind", !"hostcall"} 
# |            81: !2 = !{i32 0, i32 0} 
# |            82: !3 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project 692264c7506a830cf1fb06e321e9d4b5f44d5d09)"} 
# |            83: !4 = !{!"has.atomic-fadd-rtn-insts"} 
# |            84: !5 = !{} 
# |            85: !6 = !{!"has.gfx90a-insts"} 
# | next:104'7                                 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang.OpenMP/amdgpu-unsafe-fp-atomics.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -fopenmp -x c++ -std=c++11 -triple amdgpu-amd-amdhsa -fopenmp-targets=amdgpu-amd-amdhsa -emit-llvm C:\_work\llvm-project\llvm-project\clang\test\OpenMP\amdgpu-unsafe-fp-atomics.cpp -fopenmp-is-target-device -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --allow-unused-prefixes -check-prefix=DEFAULT C:\_work\llvm-project\llvm-project\clang\test\OpenMP\amdgpu-unsafe-fp-atomics.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -fopenmp -x c++ -std=c++11 -triple amdgpu-amd-amdhsa -fopenmp-targets=amdgpu-amd-amdhsa -emit-llvm 'C:\_work\llvm-project\llvm-project\clang\test\OpenMP\amdgpu-unsafe-fp-atomics.cpp' -fopenmp-is-target-device -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --allow-unused-prefixes -check-prefix=DEFAULT 'C:\_work\llvm-project\llvm-project\clang\test\OpenMP\amdgpu-unsafe-fp-atomics.cpp'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\OpenMP\amdgpu-unsafe-fp-atomics.cpp:42:166: error: undefined variable: META4
# | // DEFAULT-NEXT: [[TMP1:%.*]] = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @dx to ptr), double [[TMP0]] monotonic, align 8, !amdgpu.no.fine.grained.memory [[META4]], !amdgpu.no.remote.memory [[META4]]
# |                                                                                                                                                                      ^
# | C:\_work\llvm-project\llvm-project\clang\test\OpenMP\amdgpu-unsafe-fp-atomics.cpp:42:202: error: undefined variable: META4
# | // DEFAULT-NEXT: [[TMP1:%.*]] = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @dx to ptr), double [[TMP0]] monotonic, align 8, !amdgpu.no.fine.grained.memory [[META4]], !amdgpu.no.remote.memory [[META4]]
# |                                                                                                                                                                                                          ^
# | <stdin>:24:76: note: with "TMP0" equal to "%0"
# |  %0 = load double, ptr addrspacecast (ptr addrspace(1) @dv to ptr), align 8
# |                                                                            ^
# | <stdin>:24:76: note: pattern attempts to capture variables: "TMP1"
# |  %0 = load double, ptr addrspacecast (ptr addrspace(1) @dv to ptr), align 8
# |                                                                            ^
# | <stdin>:25:2: note: possible intended match here
# |  %1 = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @dx to ptr), double %0 monotonic, align 8, !amdgpu.no.fine.grained.memory !4, !amdgpu.no.remote.memory !4
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\OpenMP\amdgpu-unsafe-fp-atomics.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           19: } 
# |           20:  
# |           21: ; Function Attrs: convergent mustprogress noinline nounwind optnone 
# |           22: define hidden void @_Z15atomic_fadd_f64v() #0 { 
# |           23: entry: 
# |           24:  %0 = load double, ptr addrspacecast (ptr addrspace(1) @dv to ptr), align 8 
# | next:42'0                                                                               {   search range start (exclusive)
# | next:42'1                                                                                   error: match failed for invalid pattern
# | next:42'2                                                                                   undefined variable: META4
# | next:42'3                                                                                   undefined variable: META4
# | next:42'4                                                                                   with "TMP0" equal to "%0"
# | next:42'5                                                                                   pattern attempts to capture variables: "TMP1"
# |           25:  %1 = atomicrmw fadd ptr addrspacecast (ptr addrspace(1) @dx to ptr), double %0 monotonic, align 8, !amdgpu.no.fine.grained.memory !4, !amdgpu.no.remote.memory !4 
# | next:42'6      ?                                                                                                                                                                   possible intended match
# |           26:  %add = fadd double %1, %0 
# |           27:  store double %add, ptr addrspacecast (ptr addrspace(1) @dv to ptr), align 8 
# |           28:  ret void 
# |           29: } 
# |           30:  
# |            .
# |            .
# |            .
# |           35:  
# |           36: !0 = !{i32 1, !"amdhsa_code_object_version", i32 600} 
# |           37: !1 = !{i32 7, !"openmp", i32 51} 
# |           38: !2 = !{i32 7, !"openmp-device", i32 51} 
# |           39: !3 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project 692264c7506a830cf1fb06e321e9d4b5f44d5d09)"} 
# |           40: !4 = !{} 
# | next:42'7              } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/217587


More information about the llvm-branch-commits mailing list