[llvm] Improve diagnostic for malformed constant vectors (PR #216253)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 23 05:39:21 PDT 2026


github-actions[bot] wrote:

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

* 181149 tests passed
* 3711 tests skipped
* 6 tests failed

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

### LLVM
<details>
<summary>LLVM.Bitcode/shuffle.ll</summary>

```
Exit Code: -6

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-as < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Bitcode/shuffle.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-dis -disable-output
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-as
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-dis -disable-output
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/verify-uselistorder < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Bitcode/shuffle.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/verify-uselistorder
# .---command stdout------------
# | *** verify-uselistorder ***
# | verify bitcode
# | verify assembly
# `-----------------------------
# .---command stderr------------
# | verify-uselistorder: /tmp/lit-tmp-yrc4p8oe/uselistorder-a5e363.ll:6:117: error: unexpected vector type; constant vector elements should not repeat the type
# |   %call20.i = tail call <4 x float> @cmp(<2 x double> %d2, <2 x double> bitcast (<4 x float> <float extractelement (<3 x float> bitcast (i96 trunc (i128 bitcast (<4 x i32> <i32 0, i32 0, i32 0, i32 undef> to i128) to i96) to <3 x float>), i32 0), float extractelement (<3 x float> bitcast (i96 trunc (i128 bitcast (<4 x i32> <i32 0, i32 0, i32 0, i32 undef> to i128) to i96) to <3 x float>), i32 1), float extractelement (<3 x float> bitcast (i96 trunc (i128 bitcast (<4 x i32> <i32 0, i32 0, i32 0, i32 undef> to i128) to i96) to <3 x float>), i32 2), float undef> to <2 x double>))
# |                                                                                                                     ^
# | LLVM ERROR: parsing failed
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
# | Stack dump:
# | 0.	Program arguments: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/verify-uselistorder
# |  #0 0x00000000006f463b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:931:13
# |  #1 0x00000000006f19b1 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# |  #2 0x00000000006f544b SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:474:38
# |  #3 0x000078369b668330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# |  #4 0x000078369b6c1b2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# |  #5 0x000078369b66827e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# |  #6 0x000078369b64b8ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# |  #7 0x00000000006bbdf5 llvm::report_fatal_error(llvm::Twine const&, bool) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/ErrorHandling.cpp:137:5
# |  #8 0x00000000006bbc36 (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/verify-uselistorder+0x6bbc36)
# |  #9 0x00000000004234e8 verifyAfterRoundTrip(llvm::Module const&, std::unique_ptr<llvm::Module, std::default_delete<llvm::Module>>) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/verify-uselistorder/verify-uselistorder.cpp:365:5
# | #10 0x0000000000421f59 ~unique_ptr /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:403:6
# | #11 0x0000000000421f59 verifyAssemblyUseListOrder /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/verify-uselistorder/verify-uselistorder.cpp:391:3
# | #12 0x0000000000421f59 verifyUseListOrder(llvm::Module const&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/verify-uselistorder/verify-uselistorder.cpp:398:3
# | #13 0x00000000004207f0 main /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/verify-uselistorder/verify-uselistorder.cpp:579:3
# | #14 0x000078369b64d1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #15 0x000078369b64d28b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #16 0x0000000000420215 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/verify-uselistorder+0x420215)
# `-----------------------------
# error: command failed with exit status: -6

--

```
</details>
<details>
<summary>LLVM.CodeGen/AArch64/arm64-detect-vec-redux.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=arm64-darwin-unknown < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/arm64-detect-vec-redux.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=arm64-darwin-unknown
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc: error: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc: <stdin>:13:64: error: unexpected vector type; constant vector elements should not repeat the type
# |   %mul = mul <2 x i32> %shuffle, <i32 add (i32 extractelement (<2 x i32> bitcast (<1 x i64> <i64 -4264345899313889281> to <2 x i32>), i32 0), i32 sub (i32 0, i32 extractelement (<2 x i32> bitcast (<1 x i64> <i64 -9223231295071453185> to <2 x i32>), i32 0))), i32 undef>
# |                                                                ^
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/GlobalISel/irtranslator-constantexpr.ll</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel -mtriple=amdgpu7.00-amd-amdhsa -stop-after=irtranslator -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-constantexpr.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-constantexpr.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel -mtriple=amdgpu7.00-amd-amdhsa -stop-after=irtranslator -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-constantexpr.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc: error: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-constantexpr.ll:17:51: error: unexpected vector type; constant vector elements should not repeat the type
# |   ret i32 bitcast (<1 x i32> <i32 extractelement (<1 x i32> bitcast (i32 ptrtoint (ptr @var to i32) to <1 x i32>), i64 0)> to i32)
# |                                                   ^
# `-----------------------------
# error: command failed with exit status: 1
# 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/CodeGen/AMDGPU/GlobalISel/irtranslator-constantexpr.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-constantexpr.ll
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/icmp-vec-inseltpoison.ll</summary>

```
Exit Code: 2

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/InstCombine/icmp-vec-inseltpoison.ll -passes=instcombine -S | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/icmp-vec-inseltpoison.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=instcombine -S
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt: <stdin>:176:45: error: unexpected vector type; constant vector elements should not repeat the type
# |   %cmp = icmp sle <2 x i8> %a, <i8 bitcast (<2 x i4> <i4 1, i4 2> to i8), i8 0>
# |                                             ^
# `-----------------------------
# error: command failed with exit status: 1
# 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/InstCombine/icmp-vec-inseltpoison.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/icmp-vec-inseltpoison.ll
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/icmp-vec.ll</summary>

```
Exit Code: 2

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/InstCombine/icmp-vec.ll -passes=instcombine -S | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/icmp-vec.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=instcombine -S
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt: <stdin>:178:45: error: unexpected vector type; constant vector elements should not repeat the type
# |   %cmp = icmp sle <2 x i8> %a, <i8 bitcast (<2 x i4> <i4 1, i4 2> to i8), i8 0>
# |                                             ^
# `-----------------------------
# error: command failed with exit status: 1
# 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/InstCombine/icmp-vec.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstCombine/icmp-vec.ll
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>
<details>
<summary>LLVM.Transforms/InstSimplify/bitcast-vector-fold.ll</summary>

```
Exit Code: 2

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/InstSimplify/bitcast-vector-fold.ll -passes=instsimplify -S -data-layout="e-p:32:32:32-i1:8:8-i8:8:8-f64:32:64-v64:64:64-v128:128:128" | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstSimplify/bitcast-vector-fold.ll --check-prefixes=CHECK,LE
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=instsimplify -S -data-layout=e-p:32:32:32-i1:8:8-i8:8:8-f64:32:64-v64:64:64-v128:128:128
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt: <stdin>:103:42: error: unexpected vector type; constant vector elements should not repeat the type
# |   %ret = icmp eq <1 x i64> <i64 bitcast (<1 x double> <double 0xFFFFFFFFFFFFFFFF> to i64)>, zeroinitializer
# |                                          ^
# `-----------------------------
# error: command failed with exit status: 1
# 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/InstSimplify/bitcast-vector-fold.ll --check-prefixes=CHECK,LE
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/InstSimplify/bitcast-vector-fold.ll --check-prefixes=CHECK,LE
# `-----------------------------
# error: command failed with exit status: 2

--

```
</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/216253


More information about the llvm-commits mailing list