[llvm] [VPlan] Fold redundant idempotent and self-cancelling binary ops (PR #196080)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 02:33:58 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 173992 tests passed
* 3318 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.Transforms/LoopVectorize/consecutive-ptr-uniforms.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll -S -passes=loop-vectorize -force-vector-width=4 -force-vector-interleave=1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll -S -passes=loop-vectorize -force-vector-width=4 -force-vector-interleave=1
# 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/llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll:951:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP13:%.*]] = getelementptr inbounds i32, ptr [[NEXT_GEP]], i32 1
# |               ^
# | <stdin>:479:50: note: scanning from here
# |  %13 = insertelement <4 x i32> %12, i32 %9, i32 3
# |                                                  ^
# | <stdin>:479:50: note: with "NEXT_GEP" equal to "%next.gep"
# |  %13 = insertelement <4 x i32> %12, i32 %9, i32 3
# |                                                  ^
# | <stdin>:530:5: note: possible intended match here
# |  %tmp01 = getelementptr inbounds i32, ptr %p, i32 1
# |     ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/consecutive-ptr-uniforms.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           474:  %8 = load i32, ptr %next.gep2, align 8 
# |           475:  %9 = load i32, ptr %next.gep3, align 8 
# |           476:  %10 = insertelement <4 x i32> poison, i32 %6, i32 0 
# |           477:  %11 = insertelement <4 x i32> %10, i32 %7, i32 1 
# |           478:  %12 = insertelement <4 x i32> %11, i32 %8, i32 2 
# |           479:  %13 = insertelement <4 x i32> %12, i32 %9, i32 3 
# | next:951'0                                                      X error: no match found
# | next:951'1                                                        with "NEXT_GEP" equal to "%next.gep"
# |           480:  %14 = getelementptr inbounds i32, ptr %next.gep, i32 4 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           481:  %15 = getelementptr inbounds i32, ptr %next.gep1, i32 4 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           482:  %16 = getelementptr inbounds i32, ptr %next.gep2, i32 4 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           483:  %17 = getelementptr inbounds i32, ptr %next.gep3, i32 4 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           484:  %18 = load i32, ptr %14, align 8 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |           525:  
# | next:951'0     ~
# |           526: for.body: ; preds = %scalar.ph, %for.body 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           527:  %i = phi i64 [ %i.next, %for.body ], [ %bc.resume.val, %scalar.ph ] 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           528:  %p = phi ptr [ %tmp03, %for.body ], [ %bc.resume.val4, %scalar.ph ] 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           529:  %tmp00 = load i32, ptr %p, align 8 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           530:  %tmp01 = getelementptr inbounds i32, ptr %p, i32 1 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:951'2         ?                                                possible intended match
# |           531:  %tmp02 = load i32, ptr %tmp01, align 8 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           532:  %tmp03 = getelementptr inbounds i32, ptr %p, i32 4 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           533:  %tmp04 = load i32, ptr %tmp03, align 8 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           534:  %tmp05 = getelementptr inbounds i32, ptr %p, i32 5 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           535:  %tmp06 = load i32, ptr %tmp05, align 8 
# | next:951'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# 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/196080


More information about the llvm-commits mailing list