[llvm] VectorCombine: teach foldExtractedCmps about samesign (PR #122883)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 08:21:04 PST 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `llvm` at step 6 "build-unified-tree".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/19675
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 6 (build-unified-tree) failure: build (failure)
...
22.464 [2913/58/392] Generating obj.libclc.dir/cypress-r600--/r600/lib/workitem/get_global_offset.cl.bc
22.469 [2912/58/393] Generating obj.libclc.dir/tahiti-amdgcn-mesa-mesa3d/generic/lib/math/clc_exp10.cl.bc
22.469 [2911/58/394] Generating obj.libclc.dir/amdgcn--amdhsa/generic/lib/integer/abs.cl.bc
22.471 [2910/58/395] Generating obj.libclc.dir/amdgcn--amdhsa/clc/lib/generic/relational/clc_select.cl.bc
22.481 [2909/58/396] Generating obj.libclc.dir/amdgcn--amdhsa/clc/lib/generic/shared/clc_clamp.cl.bc
22.483 [2908/58/397] Generating obj.libclc.dir/amdgcn--amdhsa/amdgpu/lib/math/half_log2.cl.bc
22.487 [2907/58/398] Generating obj.libclc.dir/amdgcn--amdhsa/amdgcn/lib/mem_fence/fence.cl.bc
22.508 [2906/58/399] Generating obj.libclc.dir/amdgcn--amdhsa/amdgpu/lib/math/half_log.cl.bc
22.522 [2905/58/400] Generating obj.libclc.dir/amdgcn--amdhsa/amdgpu/lib/math/half_log10.cl.bc
22.526 [2904/58/401] Generating obj.libclc.dir/tahiti-amdgcn--/generic/lib/math/asinh.cl.bc
FAILED: tools/libclc/obj.libclc.dir/tahiti-amdgcn--/generic/lib/math/asinh.cl.bc /build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/tahiti-amdgcn--/generic/lib/math/asinh.cl.bc
cd /build/buildbot/premerge-monolithic-linux/build/tools/libclc && /build/buildbot/premerge-monolithic-linux/build/bin/clang-20 -target amdgcn-- -c -fno-builtin -nostdlib -D__CLC_INTERNAL -DCLC_AMDGCN -I/build/buildbot/premerge-monolithic-linux/llvm-project/libclc/clc/include -Wno-bitwise-conditional-parentheses -mcpu=tahiti -I/build/buildbot/premerge-monolithic-linux/llvm-project/libclc/generic/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/libclc/./generic/lib/math -MD -MF /build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/tahiti-amdgcn--/generic/lib/math/asinh.cl.bc.d -MT /build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/tahiti-amdgcn--/generic/lib/math/asinh.cl.bc -cl-no-stdinc -emit-llvm -o /build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/tahiti-amdgcn--/generic/lib/math/asinh.cl.bc -x cl /build/buildbot/premerge-monolithic-linux/llvm-project/libclc/./generic/lib/math/asinh.cl && /etc/cmake/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /build/buildbot/premerge-monolithic-linux/llvm-project/llvm /build/buildbot/premerge-monolithic-linux/llvm-project/libclc /build/buildbot/premerge-monolithic-linux/build /build/buildbot/premerge-monolithic-linux/build/tools/libclc /build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/tahiti-amdgcn--/generic/lib/math/asinh.cl.bc.d /build/buildbot/premerge-monolithic-linux/build/CMakeFiles/d/911d22317c463a8a227e1bfe650b88452618a018fed265277cd9077c1a87d9a4.d
Unknown predicate!
UNREACHABLE executed at /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/IR/Instructions.cpp:3852!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /build/buildbot/premerge-monolithic-linux/build/bin/clang-20 -target amdgcn-- -c -fno-builtin -nostdlib -D__CLC_INTERNAL -DCLC_AMDGCN -I/build/buildbot/premerge-monolithic-linux/llvm-project/libclc/clc/include -Wno-bitwise-conditional-parentheses -mcpu=tahiti -I/build/buildbot/premerge-monolithic-linux/llvm-project/libclc/generic/include -I/build/buildbot/premerge-monolithic-linux/llvm-project/libclc/./generic/lib/math -MD -MF /build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/tahiti-amdgcn--/generic/lib/math/asinh.cl.bc.d -MT /build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/tahiti-amdgcn--/generic/lib/math/asinh.cl.bc -cl-no-stdinc -emit-llvm -o /build/buildbot/premerge-monolithic-linux/build/tools/libclc/obj.libclc.dir/tahiti-amdgcn--/generic/lib/math/asinh.cl.bc -x cl /build/buildbot/premerge-monolithic-linux/llvm-project/libclc/./generic/lib/math/asinh.cl
1. <eof> parser at end of file
2. Optimizer
3. Running pass "function<eager-inv>(float2int,lower-constant-intrinsics,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;no-hoist-loads-stores-with-cond-faulting;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,vector-combine,instcombine<max-iterations=1;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;hoist-loads-stores-with-cond-faulting;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>)" on module "/build/buildbot/premerge-monolithic-linux/llvm-project/libclc/./generic/lib/math/asinh.cl"
4. Running pass "vector-combine" on function "_Z5asinhd"
#0 0x0000556c4e7c9718 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Unix/Signals.inc:800:13
#1 0x0000556c4e7c724e llvm::sys::RunSignalHandlers() /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Signals.cpp:106:18
#2 0x0000556c4e730d56 HandleCrash /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:73:5
#3 0x0000556c4e730d56 CrashRecoverySignalHandler(int) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:390:51
#4 0x00007bbb8bb6d520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#5 0x00007bbb8bbc19fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#6 0x00007bbb8bb6d476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#7 0x00007bbb8bb537f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#8 0x0000556c4e738ed0 llvm::install_out_of_memory_new_handler() /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/ErrorHandling.cpp:195:0
#9 0x0000556c4e182d58 getUnsignedPredicate /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/IR/Instructions.cpp:3599:14
#10 0x0000556c4e182d58 llvm::ICmpInst::getFlippedSignednessPredicate(llvm::CmpInst::Predicate) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/IR/Instructions.cpp:3848:12
#11 0x0000556c4e182f71 llvm::CmpPredicate::getMatching(llvm::CmpPredicate, llvm::CmpPredicate) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/IR/Instructions.cpp:3946:14
#12 0x0000556c50394c34 _M_is_engaged /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/optional:433:58
#13 0x0000556c50394c34 operator bool /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/optional:942:22
#14 0x0000556c50394c34 foldExtractedCmps /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp:1105:8
#15 0x0000556c50394c34 (anonymous namespace)::VectorCombine::run()::$_0::operator()(llvm::Instruction&) const /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp:3239:25
#16 0x0000556c50390c63 run /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp:0:7
#17 0x0000556c50390c63 llvm::VectorCombinePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Transforms/Vectorize/VectorCombine.cpp:3283:17
#18 0x0000556c4ff2d8cd llvm::detail::PassModel<llvm::Function, llvm::VectorCombinePass, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:5
#19 0x0000556c4e1e713a llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:85:8
#20 0x0000556c4c2b020d llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:5
#21 0x0000556c4e1eb1a7 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/IR/PassManager.cpp:129:23
#22 0x0000556c4c2bb95d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:90:5
#23 0x0000556c4e1e61ea llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/IR/PassManagerImpl.h:85:8
#24 0x0000556c4f03f0be isSmall /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:233:33
#25 0x0000556c4f03f0be ~SmallPtrSetImplBase /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/ADT/SmallPtrSet.h:84:10
#26 0x0000556c4f03f0be ~PreservedAnalyses /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/IR/Analysis.h:111:7
#27 0x0000556c4f03f0be (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&, clang::BackendConsumer*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1175:5
```
</details>
https://github.com/llvm/llvm-project/pull/122883
More information about the llvm-commits
mailing list