[llvm] [MachineVerifier] Disallow subregister defs in SSA form (PR #189403)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 08:48:48 PDT 2026


github-actions[bot] wrote:

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

* 171934 tests passed
* 3083 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/X86/GlobalISel/add-vec.ll</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-linux-gnu -mcpu=skx        -global-isel -verify-machineinstrs < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/GlobalISel/add-vec.ll -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/GlobalISel/add-vec.ll --check-prefix=ALL --check-prefix=SKX
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-linux-gnu -mcpu=skx -global-isel -verify-machineinstrs -o -
# 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/CodeGen/X86/GlobalISel/add-vec.ll --check-prefix=ALL --check-prefix=SKX
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-linux-gnu -mcpu=core-avx2  -global-isel -verify-machineinstrs < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/GlobalISel/add-vec.ll -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/GlobalISel/add-vec.ll --check-prefix=ALL --check-prefix=AVX2
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-linux-gnu -mcpu=core-avx2 -global-isel -verify-machineinstrs -o -
# 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/CodeGen/X86/GlobalISel/add-vec.ll --check-prefix=ALL --check-prefix=AVX2
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-linux-gnu -mcpu=corei7-avx -global-isel -verify-machineinstrs < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/GlobalISel/add-vec.ll -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/GlobalISel/add-vec.ll --check-prefix=ALL --check-prefix=AVX1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-linux-gnu -mcpu=corei7-avx -global-isel -verify-machineinstrs -o -
# .---command stderr------------
# | 
# | # After InstructionSelect
# | # Machine code for function test_add_v32i8: IsSSA, TracksLiveness, Legalized, RegBankSelected, Selected
# | Function Live Ins: $ymm0, $ymm1
# | 
# | bb.1 (%ir-block.0):
# |   liveins: $ymm0, $ymm1
# |   %0:vr256 = COPY $ymm0
# |   %1:vr256 = COPY $ymm1
# |   %3:vr128 = COPY %0.sub_xmm:vr256
# |   %4:vr128 = VEXTRACTF128rri %0:vr256, 1
# |   %5:vr128 = COPY %1.sub_xmm:vr256
# |   %6:vr128 = VEXTRACTF128rri %1:vr256, 1
# |   %7:vr128 = VPADDBrr %3:vr128, %5:vr128
# |   %8:vr128 = VPADDBrr %4:vr128, %6:vr128
# |   undef %9.sub_xmm:vr256 = COPY %7:vr128
# |   %10:vr256 = VINSERTF128rri %9:vr256, %8:vr128, 1
# |   $ymm0 = COPY %10:vr256
# |   RET 0, implicit $ymm0
# | 
# | # End machine code for function test_add_v32i8.
# | 
# | *** Bad machine code: Subreg def in SSA form ***
# | - function:    test_add_v32i8
# | - basic block: %bb.1  (0x1efdedb8)
# | - instruction: undef %9.sub_xmm:vr256 = COPY %7:vr128
# | - operand 0:   undef %9.sub_xmm:vr256
# | LLVM ERROR: Found 1 machine code errors.
# | 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/llc -mtriple=x86_64-linux-gnu -mcpu=corei7-avx -global-isel -verify-machineinstrs -o -
# | 1.	Running pass 'Function Pass Manager' on module '<stdin>'.
# | 2.	Running pass 'Verify generated machine code' on function '@test_add_v32i8'
# |  #0 0x00000000085b6368 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:880:13
# |  #1 0x00000000085b32d1 llvm::sys::RunSignalHandlers() /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Signals.cpp:109:18
# |  #2 0x00000000085b7181 SignalHandler(int, siginfo_t*, void*) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Signals.inc:448:38
# |  #3 0x00007b84322c4330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
# |  #4 0x00007b843231db2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
# |  #5 0x00007b84322c427e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
# |  #6 0x00007b84322a78ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
# |  #7 0x0000000008512e85 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 0x000000000738edbb (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x738edbb)
# |  #9 0x000000000738fd6f (anonymous namespace)::MachineVerifierLegacyPass::runOnMachineFunction(llvm::MachineFunction&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineVerifier.cpp:0:5
# | #10 0x000000000726c853 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:10
# | #11 0x00000000077deab8 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:0:27
# | #12 0x00000000077e6562 llvm::FPPassManager::runOnModule(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1444:13
# | #13 0x00000000077df52b runOnModule /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1513:27
# | #14 0x00000000077df52b llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:531:44
# | #15 0x0000000004f9a7ab compileModule(char**, llvm::SmallVectorImpl<llvm::PassPlugin>&, llvm::LLVMContext&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:874:17
# | #16 0x0000000004f97783 main /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/tools/llc/llc.cpp:460:13
# | #17 0x00007b84322a91ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
# | #18 0x00007b84322a928b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
# | #19 0x0000000004f932a5 _start (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc+0x4f932a5)
# `-----------------------------
# error: command failed with exit status: -6
# 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/X86/GlobalISel/add-vec.ll --check-prefix=ALL --check-prefix=AVX1
# .---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/X86/GlobalISel/add-vec.ll --check-prefix=ALL --check-prefix=AVX1
# `-----------------------------
# 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/189403


More information about the llvm-commits mailing list