[llvm] [LSV] Respect atomic ordering in isSafeToMove (PR #208631)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 18 15:00:56 PDT 2026


github-actions[bot] wrote:

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

* 138671 tests passed
* 3564 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.Transforms/LoadStoreVectorizer/NVPTX/merge-across-side-effects.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -mtriple=nvptx64-nvidia-cuda -passes=load-store-vectorizer -S -o - C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -mtriple=nvptx64-nvidia-cuda -passes=load-store-vectorizer -S -o - 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll'
# 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\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll:278:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[V01:%.*]] = extractelement <2 x i32> [[TMP1]], i32 0
# |               ^
# | <stdin>:173:38: note: scanning from here
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:173:38: note: with "TMP1" equal to "%1"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:173:38: note: pattern attempts to capture variables: "V01"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:174:2: note: possible intended match here
# |  %v01 = extractelement <2 x i32> %1, i64 0
# |  ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll:302:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[V01:%.*]] = extractelement <2 x i32> [[TMP1]], i32 0
# |               ^
# | <stdin>:184:38: note: scanning from here
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:184:38: note: with "TMP1" equal to "%1"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:184:38: note: pattern attempts to capture variables: "V01"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:185:2: note: possible intended match here
# |  %v01 = extractelement <2 x i32> %1, i64 0
# |  ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll:353:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[V01:%.*]] = extractelement <2 x i32> [[TMP1]], i32 0
# |               ^
# | <stdin>:206:38: note: scanning from here
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:206:38: note: with "TMP1" equal to "%1"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:206:38: note: pattern attempts to capture variables: "V01"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:207:2: note: possible intended match here
# |  %v01 = extractelement <2 x i32> %1, i64 0
# |  ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll:377:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[V01:%.*]] = extractelement <2 x i32> [[TMP1]], i32 0
# |               ^
# | <stdin>:216:38: note: scanning from here
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:216:38: note: with "TMP1" equal to "%1"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:216:38: note: pattern attempts to capture variables: "V01"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:217:2: note: possible intended match here
# |  %v01 = extractelement <2 x i32> %1, i64 0
# |  ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll:401:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[V01:%.*]] = extractelement <2 x i32> [[TMP1]], i32 0
# |               ^
# | <stdin>:226:38: note: scanning from here
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:226:38: note: with "TMP1" equal to "%1"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:226:38: note: pattern attempts to capture variables: "V01"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:227:2: note: possible intended match here
# |  %v01 = extractelement <2 x i32> %1, i64 0
# |  ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll:423:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[V01:%.*]] = extractelement <2 x i32> [[TMP1]], i32 0
# |               ^
# | <stdin>:236:38: note: scanning from here
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:236:38: note: with "TMP1" equal to "%1"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:236:38: note: pattern attempts to capture variables: "V01"
# |  %1 = load <2 x i32>, ptr %p, align 8
# |                                      ^
# | <stdin>:237:2: note: possible intended match here
# |  %v01 = extractelement <2 x i32> %1, i64 0
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoadStoreVectorizer\NVPTX\merge-across-side-effects.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           168:  %r1 = insertelement <2 x i32> %r0, i32 %v1, i32 1 
# |           169:  ret <2 x i32> %r1 
# |           170: } 
# |           171:  
# |           172: define <2 x i32> @load_monotonic(ptr %p, ptr noalias %flag) { 
# |           173:  %1 = load <2 x i32>, ptr %p, align 8 
# | next:278'0                                         {   search range start (exclusive)
# | next:278'1                                             error: no match found in search range
# | next:278'2                                             with "TMP1" equal to "%1"
# | next:278'3                                             pattern attempts to capture variables: "V01"
# |           174:  %v01 = extractelement <2 x i32> %1, i64 0 
# | next:278'4      ?                                           possible intended match
# |           175:  %v12 = extractelement <2 x i32> %1, i64 1 
# |           176:  %f = load atomic i32, ptr %flag monotonic, align 4 
# |           177:  %add = add i32 %v01, %f 
# |           178:  %r0 = insertelement <2 x i32> poison, i32 %add, i32 0 
# |           179:  %r1 = insertelement <2 x i32> %r0, i32 %v12, i32 1 
# |           180:  ret <2 x i32> %r1 
# |           181: } 
# |           182:  
# |           183: define <2 x i32> @load_unordered(ptr %p, ptr %flag) { 
# | next:278'5                                      }                      search range end (exclusive)
# |           184:  %1 = load <2 x i32>, ptr %p, align 8 
# | next:302'0                                         {   search range start (exclusive)
# | next:302'1                                             error: no match found in search range
# | next:302'2                                             with "TMP1" equal to "%1"
# | next:302'3                                             pattern attempts to capture variables: "V01"
# |           185:  %v01 = extractelement <2 x i32> %1, i64 0 
# | next:302'4      ?                                           possible intended match
# |           186:  %v12 = extractelement <2 x i32> %1, i64 1 
# |           187:  %f = load atomic i32, ptr %flag unordered, align 4 
# |           188:  %add = add i32 %v01, %f 
# |           189:  %r0 = insertelement <2 x i32> poison, i32 %add, i32 0 
# |           190:  %r1 = insertelement <2 x i32> %r0, i32 %v12, i32 1 
# |           191:  ret <2 x i32> %r1 
# |           192: } 
# |           193:  
# |           194: define <2 x i32> @load_volatile(ptr %p, ptr %flag) { 
# | next:302'5                                     }                      search range end (exclusive)
# |           195:  %p.1 = getelementptr i8, ptr %p, i64 4 
# |           196:  %v0 = load i32, ptr %p, align 8 
# |           197:  %f = load volatile i32, ptr %flag, align 4 
# |           198:  %v1 = load i32, ptr %p.1, align 4 
# |           199:  %add = add i32 %v0, %f 
# |           200:  %r0 = insertelement <2 x i32> poison, i32 %add, i32 0 
# |           201:  %r1 = insertelement <2 x i32> %r0, i32 %v1, i32 1 
# |           202:  ret <2 x i32> %r1 
# |           203: } 
# |           204:  
# |           205: define <2 x i32> @load_release_store(ptr %p, ptr noalias %flag) { 
# |           206:  %1 = load <2 x i32>, ptr %p, align 8 
# | next:353'0                                         {   search range start (exclusive)
# | next:353'1                                             error: no match found in search range
# | next:353'2                                             with "TMP1" equal to "%1"
# | next:353'3                                             pattern attempts to capture variables: "V01"
# |           207:  %v01 = extractelement <2 x i32> %1, i64 0 
# | next:353'4      ?                                           possible intended match
# |           208:  %v12 = extractelement <2 x i32> %1, i64 1 
# |           209:  store atomic i32 1, ptr %flag release, align 4 
# |           210:  %r0 = insertelement <2 x i32> poison, i32 %v01, i32 0 
# |           211:  %r1 = insertelement <2 x i32> %r0, i32 %v12, i32 1 
# |           212:  ret <2 x i32> %r1 
# |           213: } 
# |           214:  
# |           215: define <2 x i32> @load_seq_cst_store(ptr %p, ptr noalias %flag) { 
# | next:353'5                                          }                              search range end (exclusive)
# |           216:  %1 = load <2 x i32>, ptr %p, align 8 
# | next:377'0                                         {   search range start (exclusive)
# | next:377'1                                             error: no match found in search range
# | next:377'2                                             with "TMP1" equal to "%1"
# | next:377'3                                             pattern attempts to capture variables: "V01"
# |           217:  %v01 = extractelement <2 x i32> %1, i64 0 
# | next:377'4      ?                                           possible intended match
# |           218:  %v12 = extractelement <2 x i32> %1, i64 1 
# |           219:  store atomic i32 1, ptr %flag seq_cst, align 4 
# |           220:  %r0 = insertelement <2 x i32> poison, i32 %v01, i32 0 
# |           221:  %r1 = insertelement <2 x i32> %r0, i32 %v12, i32 1 
# |           222:  ret <2 x i32> %r1 
# |           223: } 
# |           224:  
# |           225: define <2 x i32> @load_release_rmw(ptr %p, ptr noalias %flag) { 
# | next:377'5                                        }                              search range end (exclusive)
# |           226:  %1 = load <2 x i32>, ptr %p, align 8 
# | next:401'0                                         {   search range start (exclusive)
# | next:401'1                                             error: no match found in search range
# | next:401'2                                             with "TMP1" equal to "%1"
# | next:401'3                                             pattern attempts to capture variables:
# | ...
# `---data was truncated (10240/12373) (change limit with -D output_limit=N)
# 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/208631


More information about the llvm-commits mailing list