intel / intel/llvm

Test failure in esimd/ctor_codegen.cpp, LLVM output removes `nsw`

Open
#22,392 0 comments 0 reactions 0 assignees View on GitHub
bug confirmed esimd
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

### Describe the bug

You can see here: https://github.com/intel/llvm/actions/runs/27990882378/job/82842835233?pr=22326

```
2026-06-22T23:32:25.3449266Z FAIL: SYCL :: esimd/ctor_codegen.cpp (1864 of 3232)
2026-06-22T23:32:25.3449852Z ******************** TEST 'SYCL :: esimd/ctor_codegen.cpp' FAILED ********************
2026-06-22T23:32:25.3450318Z Exit Code: 1
2026-06-22T23:32:25.3450527Z
2026-06-22T23:32:25.3450656Z Command Output (stdout):
2026-06-22T23:32:25.3450956Z --
2026-06-22T23:32:25.3451258Z # RUN: at line 1
d:\github\_work\llvm\llvm\build\bin\clang.exe --driver-mode=g++ -fsycl -fsycl-device-only -S D:\github\_work\llvm\llvm\src\sycl\test\esimd\ctor_codegen.cpp -o - | FileCheck D:\github\_work\llvm\llvm\src\sycl\test\esimd\ctor_codegen.cpp
# executed command: 'd:\github\_work\llvm\llvm\build\bin\clang.exe' --driver-mode=g++ -fsycl -fsycl-device-only -S 'D:\github\_work\llvm\llvm\src\sycl\test\esimd\ctor_codegen.cpp' -o -
# executed command: FileCheck 'D:\github\_work\llvm\llvm\src\sycl\test\esimd\ctor_codegen.cpp'
# .---command stderr------------
# | D:\github\_work\llvm\llvm\src\sycl\test\esimd\ctor_codegen.cpp:77:12: error: CHECK: expected string not found in input
# | // CHECK: %[[BASE_INC:[a-zA-Z0-9_\.]+]] = add nsw i32 %[[BASE]], %[[STEP]]
# | ^
# | :86:69: note: scanning from here
# | %vecinit.i.i.i.i = insertelement <2 x i32> poison, i32 %base, i64 0
# | ^
# | :86:69: note: with "BASE" equal to "base"
# | %vecinit.i.i.i.i = insertelement <2 x i32> poison, i32 %base, i64 0
# | ^
# | :86:69: note: with "STEP" equal to "step"
# | %vecinit.i.i.i.i = insertelement <2 x i32> poison, i32 %base, i64 0
# | ^
# | :87:2: note: possible intended match here
# | %add2.i.i.i.i = add i32 %base, %step
# | ^
# |
# | Input file:
# | Check file: D:\github\_work\llvm\llvm\src\sycl\test\esimd\ctor_codegen.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 81: }
# | 82:
# | 83: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write)
# | 84: define dso_local spir_func void @_Z20int_base_step_var_n2ii(ptr addrspace(4) dead_on_unwind noalias writable writeonly sret(%"class.sycl::_V1::ext::intel::esimd::simd.14") align 8 captures(none) initializes((0, 8)) %agg.result, i32 noundef %base, i32 noundef %step) local_unnamed_addr #0 !sycl_explicit_simd !7 !intel_reqd_sub_group_size !8 !sycl_used_aspects !13 !sycl_fixed_targets !7 {
# | 85: entry:
# | 86: %vecinit.i.i.i.i = insertelement <2 x i32> poison, i32 %base, i64 0
# | check:77'0 X error: no match found
# | check:77'1 with "BASE" equal to "base"
# | check:77'2 with "STEP" equal to "step"
# | 87: %add2.i.i.i.i = add i32 %base, %step
# | check:77'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:77'3 ? possible intended match
# | 88: %vecinit3.i.i.i.i = insertelement <2 x i32> %vecinit.i.i.i.i, i32 %add2.i.i.i.i, i64 1
# | check:77'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 89: store <2 x i32> %vecinit3.i.i.i.i, ptr addrspace(4) %agg.result, align 8
# | check:77'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 90: ret void
# | check:77'0 ~~~~~~~~~~
# | 91: }
# | check:77'0 ~~
# | 92:
# | check:77'0 ~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
```

### To reproduce

### Environment

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Open sycl/test/esimd/ctor_codegen.cpp around the CHECK at line 77 and inspect the generated IR shown in the failure. Re-run the displayed clang and FileCheck command, then determine whether the test expectation or code generation is responsible; done means the ctor_codegen.cpp test passes with the intended add instruction attributes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.