[llvm] [LV] Add extra check for signed oveflow for SDiv/SRem (PR #170818)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 5 01:27:03 PST 2025


github-actions[bot] wrote:

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

* 166786 tests passed
* 2909 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.Transforms/LoopVectorize/AArch64/invalid-costs.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes="loop-vectorize" -pass-remarks-output=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/LoopVectorize/AArch64/Output/invalid-costs.ll.tmp.yaml -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/invalid-costs.ll | /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/AArch64/invalid-costs.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=loop-vectorize -pass-remarks-output=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/LoopVectorize/AArch64/Output/invalid-costs.ll.tmp.yaml -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/invalid-costs.ll
# 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/AArch64/invalid-costs.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/invalid-costs.ll:35:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP12:%.*]] = sdiv <vscale x 4 x i64> [[TMP10]], [[TMP11]]
# |               ^
# | <stdin>:31:92: note: scanning from here
# |  %11 = select <vscale x 4 x i1> %5, <vscale x 4 x i64> %7, <vscale x 4 x i64> splat (i64 1)
# |                                                                                            ^
# | <stdin>:31:92: note: with "TMP10" equal to "%10"
# |  %11 = select <vscale x 4 x i1> %5, <vscale x 4 x i64> %7, <vscale x 4 x i64> splat (i64 1)
# |                                                                                            ^
# | <stdin>:31:92: note: with "TMP11" equal to "%11"
# |  %11 = select <vscale x 4 x i1> %5, <vscale x 4 x i64> %7, <vscale x 4 x i64> splat (i64 1)
# |                                                                                            ^
# | <stdin>:33:2: note: possible intended match here
# |  %13 = sdiv <vscale x 4 x i64> %12, %11
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/invalid-costs.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           26:  %wide.masked.load = call <vscale x 4 x i32> @llvm.masked.load.nxv4i32.p0(ptr align 4 %6, <vscale x 4 x i1> %5, <vscale x 4 x i32> poison) 
# |           27:  %7 = sext <vscale x 4 x i32> %wide.masked.load to <vscale x 4 x i64> 
# |           28:  %8 = ashr <vscale x 4 x i32> %wide.masked.load, splat (i32 1) 
# |           29:  %9 = add <vscale x 4 x i32> %8, %wide.load 
# |           30:  %10 = sext <vscale x 4 x i32> %9 to <vscale x 4 x i64> 
# |           31:  %11 = select <vscale x 4 x i1> %5, <vscale x 4 x i64> %7, <vscale x 4 x i64> splat (i64 1) 
# | next:35'0                                                                                                X error: no match found
# | next:35'1                                                                                                  with "TMP10" equal to "%10"
# | next:35'2                                                                                                  with "TMP11" equal to "%11"
# |           32:  %12 = select <vscale x 4 x i1> %5, <vscale x 4 x i64> %10, <vscale x 4 x i64> zeroinitializer 
# | next:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           33:  %13 = sdiv <vscale x 4 x i64> %12, %11 
# | next:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:35'3      ?                                       possible intended match
# |           34:  %14 = trunc <vscale x 4 x i64> %13 to <vscale x 4 x i32> 
# | next:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           35:  %predphi = select <vscale x 4 x i1> %5, <vscale x 4 x i32> %14, <vscale x 4 x i32> %wide.load 
# | next:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           36:  %15 = getelementptr inbounds i32, ptr %a, i64 %index 
# | next:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           37:  store <vscale x 4 x i32> %predphi, ptr %15, align 4 
# | next:35'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           38:  %index.next = add nuw i64 %index, %3 
# | next:35'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/170818


More information about the llvm-commits mailing list