[llvm] [OpenMPOpt][Attributor] Avoid eager deglobalization AA registration (PR #198710)

ZT Qin via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 00:18:37 PDT 2026


nolongerwait wrote:

> # 🐧 Linux x64 Test Results
> * 175155 tests passed
> * 3454 tests skipped
> * 1 test failed
> 
> ## Failed Tests
> (click on a test name to see its output)
> 
> ### Clang
> Clang.CodeGen/attr-counted-by-issue200014.c (Likely Already Failing)
> This test is already failing at the base commit.
> ```
> Exit Code: 1
> 
> Command Output (stdout):
> --
> # RUN: at line 11
> /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -O0 -Wno-missing-declarations    -disable-O0-optnone -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c    | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=mem2reg,sroa | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c --check-prefix=FRONTEND
> # executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -O0 -Wno-missing-declarations -disable-O0-optnone -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c
> # note: command had no output on stdout or stderr
> # executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=mem2reg,sroa
> # note: command had no output on stdout or stderr
> # executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c --check-prefix=FRONTEND
> # note: command had no output on stdout or stderr
> # RUN: at line 14
> /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -O0 -Wno-missing-declarations    -fexperimental-new-constant-interpreter -disable-O0-optnone    -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c    | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=mem2reg,sroa | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c --check-prefix=FRONTEND
> # executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -O0 -Wno-missing-declarations -fexperimental-new-constant-interpreter -disable-O0-optnone -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c
> # note: command had no output on stdout or stderr
> # executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=mem2reg,sroa
> # note: command had no output on stdout or stderr
> # executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c --check-prefix=FRONTEND
> # note: command had no output on stdout or stderr
> # RUN: at line 20
> /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -O2 -Wno-missing-declarations    -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c --check-prefix=O2
> # executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -O2 -Wno-missing-declarations -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c
> # note: command had no output on stdout or stderr
> # executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c --check-prefix=O2
> # .---command stderr------------
> # | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c:285:13: error: O2-SAME: expected string not found in input
> # | // O2-SAME: ptr noundef readonly captures(none) [[P:%.*]]) local_unnamed_addr #[[ATTR4:[0-9]+]] {
> # |             ^
> # | <stdin>:80:66: note: scanning from here
> # | define dso_local range(i64 0, -9223372036854775808) i64 @ptr_fam(ptr nofree noundef readonly captures(none) %p) local_unnamed_addr #4 {
> # |                                                                  ^
> # | <stdin>:80:73: note: possible intended match here
> # | define dso_local range(i64 0, -9223372036854775808) i64 @ptr_fam(ptr nofree noundef readonly captures(none) %p) local_unnamed_addr #4 {
> # |                                                                         ^
> # | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c:313:82: error: undefined variable: ATTR4
> # | // O2-SAME: ptr noundef readonly captures(none) [[P:%.*]]) local_unnamed_addr #[[ATTR4]] {
> # |                                                                                  ^
> # | <stdin>:88:79: note: possible intended match here
> # | define dso_local range(i64 0, -9223372036854775808) i64 @ptr_subscript(ptr nofree noundef readonly captures(none) %p) local_unnamed_addr #4 {
> # |                                                                               ^
> # | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c:335:13: error: O2-SAME: expected string not found in input
> # | // O2-SAME: ptr noundef readnone [[P:%.*]]) local_unnamed_addr #[[ATTR3]] {
> # |             ^
> # | <stdin>:97:34: note: scanning from here
> # | define dso_local i64 @ptr_addrof(ptr nofree noundef readnone %p) local_unnamed_addr #3 {
> # |                                  ^
> # | <stdin>:97:34: note: with "ATTR3" equal to "3"
> # | define dso_local i64 @ptr_addrof(ptr nofree noundef readnone %p) local_unnamed_addr #3 {
> # |                                  ^
> # | <stdin>:97:41: note: possible intended match here
> # | define dso_local i64 @ptr_addrof(ptr nofree noundef readnone %p) local_unnamed_addr #3 {
> # |                                         ^
> # | 
> # | Input file: <stdin>
> # | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/attr-counted-by-issue200014.c
> # | 
> # | -dump-input=help explains the following input dump.
> # | 
> # | Input was:
> # | <<<<<<
> # |             .
> # |             .
> # |             .
> # |            75: entry: 
> # |            76:  ret i64 15 
> # |            77: } 
> # |            78:  
> # |            79: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) 
> # |            80: define dso_local range(i64 0, -9223372036854775808) i64 @ptr_fam(ptr nofree noundef readonly captures(none) %p) local_unnamed_addr #4 { 
> # | same:285'0                                                                      X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
> # | same:285'1                                                                             ?                                                                possible intended match
> # |            81: entry: 
> # | same:285'0     ~~~~~~~
> # |            82:  %counted_by.load = load i64, ptr %p, align 4 
> # | same:285'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> # |            83:  %0 = tail call i64 @llvm.smax.i64(i64 %counted_by.load, i64 0) 
> # | same:285'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> # |            84:  ret i64 %0 
> # | same:285'0     ~~~~~~~~~~~~
> # |            85: } 
> # | same:285'0     ~~
> # |            86:  
> # | same:285'0     ~
> # |            87: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) 
> # | same:285'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> # |            88: define dso_local range(i64 0, -9223372036854775808) i64 @ptr_subscript(ptr nofree noundef readonly captures(none) %p) local_unnamed_addr #4 { 
> # | same:285'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> # | same:313'0                                                                            X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: match failed for invalid pattern
> # | same:313'1                                                                                                                                                    undefined variable: ATTR4
> # | same:313'2                                                                                   ?                                                                possible intended match
> # |            89: entry: 
> # | same:313'0     ~~~~~~~
> # |            90:  %counted_by.load = load i64, ptr %p, align 4 
> # | same:313'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> # |            91:  %result = add i64 %counted_by.load, -3 
> # | same:313'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> # |            92:  %0 = tail call i64 @llvm.smax.i64(i64 %result, i64 0) 
> # | same:313'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> # |            93:  ret i64 %0 
> # | same:313'0     ~~~~~~~~~~~~
> # |            94: } 
> # | same:313'0     ~~
> # |            95:  
> # | same:313'0     ~
> # |            96: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
> # | same:313'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> # |            97: define dso_local i64 @ptr_addrof(ptr nofree noundef readnone %p) local_unnamed_addr #3 { 
> # | same:313'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> # | same:335'0                                      X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
> # | same:335'1                                                                                               with "ATTR3" equal to "3"
> # | same:335'2                                             ?                                                 possible intended match
> # |            98: entry: 
> # | same:335'0     ~~~~~~~
> # |            99:  ret i64 -1 
> # | same:335'0     ~~~~~~~~~~~~
> # |           100: } 
> # | same:335'0     ~~
> # |           101:  
> # | same:335'0     ~
> # |           102: ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) 
> # | same:335'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> # |             .
> # |             .
> # |             .
> # | >>>>>>
> # `-----------------------------
> # error: command failed with exit status: 1
> 
> --
> ```
> 
> 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.

The latest check failure appears to be due to the new test introduced by 564d69a8dec3183ebd78a779efdd8903bbe89f68 on main, rather than this patch itself.

I rebased this PR locally onto the latest main and the relevant test passes there. I can push the rebase to refresh the CI results.

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


More information about the llvm-commits mailing list