[llvm] [AMDGPU] Fix whole-wave function prologue to set EXEC to -1 (PR #207781)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 03:21:12 PDT 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-expensive-checks-debian` running on `gribozavr4` while building `llvm` at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/16/builds/2455

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/whole-wave-functions-pei.mir' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -mtriple=amdgcn -mcpu=gfx1200 -run-pass=prolog-epilog -o - /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/whole-wave-functions-pei.mir | /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/FileCheck /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/whole-wave-functions-pei.mir
# executed command: /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -mtriple=amdgcn -mcpu=gfx1200 -run-pass=prolog-epilog -o - /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/whole-wave-functions-pei.mir
# .---command stderr------------
# | 
# | # After Prologue/Epilogue Insertion & Frame Finalization
# | # Machine code for function dont_restore_used_vgprs: NoPHIs, TracksLiveness, NoVRegs, TracksDebugUserValues
# | Function Live Ins: $vgpr0, $vgpr20, $vgpr40
# | 
# | bb.0:
# |   liveins: $vgpr0, $vgpr20, $vgpr40
# |   frame-setup CFI_INSTRUCTION llvm_def_aspace_cfa $sgpr32, 0, 6
# |   frame-setup CFI_INSTRUCTION llvm_register_pair $pc_reg, $sgpr30, 32, $sgpr31, 32
# |   frame-setup CFI_INSTRUCTION undefined $sgpr0
# |   $exec_lo = S_MOV_B32 -1
# |   S_NOP 0, implicit $vgpr0, implicit $vgpr20, implicit $vgpr40
# |   $exec_lo = S_MOV_B32 $sgpr0
# |   SI_RETURN implicit killed $vgpr0
# | 
# | # End machine code for function dont_restore_used_vgprs.
# | 
# | *** Bad machine code: Using an undefined physical register ***
# | - function:    dont_restore_used_vgprs
# | - basic block: %bb.0  (0xc745278)
# | - instruction: $exec_lo = S_MOV_B32 $sgpr0
# | - operand 1:   $sgpr0
# | 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: /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -mtriple=amdgcn -mcpu=gfx1200 -run-pass=prolog-epilog -o - /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/whole-wave-functions-pei.mir
# | 1.	Running pass 'Function Pass Manager' on module '/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/whole-wave-functions-pei.mir'.
# | 2.	Running pass 'Verify generated machine code' on function '@dont_restore_used_vgprs'
# |  #0 0x0000000003e654ba llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x3e654ba)
# |  #1 0x0000000003e6239e llvm::sys::RunSignalHandlers() (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x3e6239e)
# |  #2 0x0000000003e6627a SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
# |  #3 0x00007f0853ab9170 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13170)
# |  #4 0x00007f08535cdd61 raise (/lib/x86_64-linux-gnu/libc.so.6+0x38d61)
# |  #5 0x00007f08535b7537 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22537)
# |  #6 0x0000000003dc04bd llvm::report_fatal_error(llvm::Twine const&, bool) (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x3dc04bd)
# |  #7 0x0000000002e5f87f (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x2e5f87f)
# |  #8 0x0000000002e60bb0 (anonymous namespace)::MachineVerifierLegacyPass::runOnMachineFunction(llvm::MachineFunction&) MachineVerifier.cpp:0:0
# |  #9 0x0000000002d55bdb llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x2d55bdb)
# | #10 0x00000000032f6c9f llvm::FPPassManager::runOnFunction(llvm::Function&) (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x32f6c9f)
# | #11 0x00000000032fdc61 llvm::FPPassManager::runOnModule(llvm::Module&) (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x32fdc61)
# | #12 0x00000000032f773e llvm::legacy::PassManagerImpl::run(llvm::Module&) (/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc+0x32f773e)
...

```

</details>

https://github.com/llvm/llvm-project/pull/207781


More information about the llvm-commits mailing list