[llvm] [InstCombine] Iterative replacement in PtrReplacer (PR #137215)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 16 09:57:37 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `llvm` at step 10 "Add check check-libc-amdgcn-amd-amdhsa".

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

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

```
Step 10 (Add check check-libc-amdgcn-amd-amdhsa) failure: test (failure)
...
[ RUN      ] LlvmLibcUIntClassTest.OtherWordTypeTests
[       OK ] LlvmLibcUIntClassTest.OtherWordTypeTests (2 us)
[ RUN      ] LlvmLibcUIntClassTest.OtherWordTypeCastTests
[       OK ] LlvmLibcUIntClassTest.OtherWordTypeCastTests (1 us)
[ RUN      ] LlvmLibcUIntClassTest.SignedOtherWordTypeCastTests
[       OK ] LlvmLibcUIntClassTest.SignedOtherWordTypeCastTests (2 us)
[ RUN      ] LlvmLibcUIntClassTest.MixedSignednessOtherWordTypeCastTests
[       OK ] LlvmLibcUIntClassTest.MixedSignednessOtherWordTypeCastTests (1 us)
Ran 88 tests.  PASS: 88  FAIL: 0
[2037/2807] Linking CXX executable libc/test/src/stdio/libc.test.src.stdio.ungetc_test.__hermetic__.__build__
FAILED: libc/test/src/stdio/libc.test.src.stdio.ungetc_test.__hermetic__.__build__ 
: && /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/./bin/clang++ --target=amdgcn-amd-amdhsa -O3 -DNDEBUG --target=amdgcn-amd-amdhsa -Wno-multi-gpu -mcpu=native -flto -Wl,-mllvm,-amdgpu-lower-global-ctor-dtor=0 -nostdlib -static -Wl,-mllvm,-amdhsa-code-object-version=6 libc/startup/gpu/amdgpu/CMakeFiles/libc.startup.gpu.amdgpu.crt1.dir/start.cpp.o libc/test/src/stdio/CMakeFiles/libc.test.src.stdio.ungetc_test.__hermetic__.__build__.dir/ungetc_test.cpp.o -o libc/test/src/stdio/libc.test.src.stdio.ungetc_test.__hermetic__.__build__  libc/test/UnitTest/libLibcTest.hermetic.a  libc/test/UnitTest/libLibcHermeticTestSupport.hermetic.a  libc/test/src/stdio/liblibc.test.src.stdio.ungetc_test.__hermetic__.libc.a && :
ld.lld: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:415: void {anonymous}::PointerReplacer::replace(llvm::Instruction*): Assertion `V && "Operand not replaced"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/ld.lld --no-undefined -shared -plugin-opt=mcpu=gfx90a -plugin-opt=O3 --lto-CGO3 -L/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/amdgcn-amd-amdhsa -mllvm -amdgpu-lower-global-ctor-dtor=0 -mllvm -amdhsa-code-object-version=6 libc/startup/gpu/amdgpu/CMakeFiles/libc.startup.gpu.amdgpu.crt1.dir/start.cpp.o libc/test/src/stdio/CMakeFiles/libc.test.src.stdio.ungetc_test.__hermetic__.__build__.dir/ungetc_test.cpp.o libc/test/UnitTest/libLibcTest.hermetic.a libc/test/UnitTest/libLibcHermeticTestSupport.hermetic.a libc/test/src/stdio/liblibc.test.src.stdio.ungetc_test.__hermetic__.libc.a -o libc/test/src/stdio/libc.test.src.stdio.ungetc_test.__hermetic__.__build__
1.	Running pass "function<eager-inv>(instcombine<max-iterations=1;no-verify-fixpoint>,amdgpu-usenative,amdgpu-simplifylib,constraint-elimination,jump-threading,sroa<modify-cfg>,tailcallelim)" on module "ld-temp.o"
2.	Running pass "instcombine<max-iterations=1;no-verify-fixpoint>" on function "_ZN35LlvmLibcUngetcTest_UngetAndReadBack3RunEv"
 #0 0x000076b7c29f4710 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/libLLVMSupport.so.21.0git+0x1f4710)
 #1 0x000076b7c29f1b1f llvm::sys::RunSignalHandlers() (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/libLLVMSupport.so.21.0git+0x1f1b1f)
 #2 0x000076b7c29f1c6a SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x000076b7c2042520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x000076b7c20969fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x000076b7c20969fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x000076b7c20969fc pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x000076b7c2042476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x000076b7c20287f3 abort ./stdlib/abort.c:81:7
 #9 0x000076b7c202871b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x000076b7c2039e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#11 0x000076b7bd3385f2 llvm::InstCombinerImpl::visitAllocaInst(llvm::AllocaInst&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/../lib/libLLVMInstCombine.so.21.0git+0x11e5f2)
#12 0x000076b7bd272f2e llvm::InstCombinerImpl::run() (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/../lib/libLLVMInstCombine.so.21.0git+0x58f2e)
#13 0x000076b7bd27499a combineInstructionsOverFunction(llvm::Function&, llvm::InstructionWorklist&, llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*, llvm::BranchProbabilityInfo*, llvm::ProfileSummaryInfo*, llvm::InstCombineOptions const&) InstructionCombining.cpp:0:0
#14 0x000076b7bd275d7d llvm::InstCombinePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/../lib/libLLVMInstCombine.so.21.0git+0x5bd7d)
#15 0x000076b7bfc87d26 llvm::detail::PassModel<llvm::Function, llvm::InstCombinePass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/libLLVMPasses.so.21.0git+0x87d26)
#16 0x000076b7be902cef llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/libLLVMCore.so.21.0git+0x302cef)
#17 0x000076b7c18ad5e6 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/libLLVMX86CodeGen.so.21.0git+0xad5e6)
#18 0x000076b7be903243 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/libLLVMCore.so.21.0git+0x303243)
#19 0x000076b7c18adfa6 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/libLLVMX86CodeGen.so.21.0git+0xadfa6)
#20 0x000076b7be9049fc llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/libLLVMCore.so.21.0git+0x3049fc)
#21 0x000076b7c2b1d5ec runNewPMPasses(llvm::lto::Config const&, llvm::Module&, llvm::TargetMachine*, unsigned int, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*) LTOBackend.cpp:0:0
#22 0x000076b7c2b1f042 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::vector<unsigned char, std::allocator<unsigned char>> const&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/libLLVMLTO.so.21.0git+0x52042)
#23 0x000076b7c2b219f4 llvm::lto::backend(llvm::lto::Config const&, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/libLLVMLTO.so.21.0git+0x549f4)
#24 0x000076b7c2b0eee0 llvm::lto::LTO::runRegularLTO(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/libLLVMLTO.so.21.0git+0x41ee0)
#25 0x000076b7c2b14206 llvm::lto::LTO::run(std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream>>> (unsigned int, llvm::Twine const&)>, llvm::FileCache) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/../lib/libLLVMLTO.so.21.0git+0x47206)
#26 0x000076b7c3192b18 lld::elf::BitcodeCompiler::compile() (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/liblldELF.so.21.0git+0x192b18)
#27 0x000076b7c30e037d void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::endianness)1, true>>(bool) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/liblldELF.so.21.0git+0xe037d)
#28 0x000076b7c3102e44 void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::endianness)1, true>>(llvm::opt::InputArgList&) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/liblldELF.so.21.0git+0x102e44)
#29 0x000076b7c310af68 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/liblldELF.so.21.0git+0x10af68)
#30 0x000076b7c310b544 lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) (/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/../lib/liblldELF.so.21.0git+0x10b544)

```

</details>

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


More information about the llvm-commits mailing list