[llvm] [InstCombine] Preserve profile after folding select instructions with conditionals (PR #159666)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 3 10:23:11 PDT 2025


shiltian wrote:

The build error is real:

```
FAILED: [code=1] lib/libLLVMInstCombine.so.22.0git
: && /home/linuxbrew/.linuxbrew/bin/clang++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -shared  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics  -Wl,--gc-sections  -Xlinker --dependency-file=lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/link.d -Wl,-soname,libLLVMInstCombine.so.22.0git -o lib/libLLVMInstCombine.so.22.0git lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstructionCombining.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineAddSub.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineAtomicRMW.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineAndOrXor.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineCalls.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineCasts.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineCompares.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineLoadStoreAlloca.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineMulDivRem.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineNegator.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombinePHI.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineSelect.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineShifts.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineSimplifyDemanded.cpp.o lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineVectorOps.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/nfs/build/llvm/release/lib:"  lib/libLLVMTransformUtils.so.22.0git  lib/libLLVMAnalysis.so.22.0git  lib/libLLVMCore.so.22.0git  lib/libLLVMSupport.so.22.0git  -Wl,-rpath-link,/home/nfs/build/llvm/release/lib && :
ld.lld: error: undefined symbol: ProfcheckDisableMetadataFixes
>>> referenced by InstCombineSelect.cpp
>>>               lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstCombineSelect.cpp.o:(llvm::InstCombinerImpl::visitSelectInst(llvm::SelectInst&)::$_1::operator()(bool, llvm::Value*, llvm::Value*) const)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```

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


More information about the llvm-commits mailing list