[llvm] [AArch64][CostModel] Model extension costs with narrow int sdiv/udiv/srem/urem (PR #197879)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 01:33:50 PDT 2026


github-actions[bot] wrote:

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

* 134771 tests passed
* 3278 tests skipped
* 1 test failed

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

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

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -passes=loop-vectorize -debug-only=loop-vectorize  C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\AArch64\binop-costs.ll -S -o - 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\AArch64\binop-costs.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=loop-vectorize -debug-only=loop-vectorize 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\AArch64\binop-costs.ll' -S -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\llvm\test\Transforms\LoopVectorize\AArch64\binop-costs.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\AArch64\binop-costs.ll:10:10: error: CHECK: expected string not found in input
# | ; CHECK: LV: Found an estimated cost of 5 for VF 1 For instruction: %div = udiv i8 %iv.trunc, 3
# |          ^
# | <stdin>:2:43: note: scanning from here
# | LV: Checking a loop in 'udiv_rhs_opt_cost' from C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\AArch64\binop-costs.ll
# |                                           ^
# | <stdin>:21:1: note: possible intended match here
# | LV: Found uniform instruction: %div = udiv i8 %iv.trunc, 3
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\AArch64\binop-costs.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1:  
# |             2: LV: Checking a loop in 'udiv_rhs_opt_cost' from C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopVectorize\AArch64\binop-costs.ll 
# | check:10'0                                               X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             3: LV: Loop hints: force=? width=vscale x 0 interleave=0 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             4: LV: Found a loop: loop 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |             5: LV: Found an induction variable. 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             6: LV: Did not find one integer induction var. 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             7: LV: We can vectorize this loop! 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |            16: LV: The Widest register safe to use is: vscale x 128 bits. 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            17: LV: Found feasible scalable VF = vscale x 4 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            18: LV: Found uniform instruction: %cmp = icmp ult i64 %iv, 117 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            19: LV: Found uniform instruction: %gep.dst = getelementptr i32, ptr %dst, i64 %div.ext 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            20: LV: Found uniform instruction: %div.ext = zext i8 %div to i64 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            21: LV: Found uniform instruction: %div = udiv i8 %iv.trunc, 3 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:10'1     ?                                                           possible intended match
# |            22: LV: Found uniform instruction: %iv.trunc = trunc i64 %iv to i8 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            23: LV: Found uniform instruction: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ] 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            24: LV: Found uniform instruction: %iv.next = add i64 %iv, 3 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            25: LV: Found scalar instruction: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ] 
# | check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            26: LV: Found scalar instruction: %iv.next = add i64 %iv, 3 
# | check:10'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/197879


More information about the llvm-commits mailing list