[llvm] [WebAssembly] load_zero to initialise build_vector (PR #100610)
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 4 06:32:48 PDT 2024
sbc100 wrote:
This is causing the llvm roller in emscripten to fail due to failing tests test_avx, test_sse4_1, test_sse2:
See https://ci.chromium.org/ui/p/emscripten-releases/builders/try/linux/b8740537667603659377/overview and
https://logs.chromium.org/logs/emscripten-releases/buildbucket/cr-buildbucket/8740537667603659377/+/u/Emscripten_testsuite__cores_/stdout
test_avx fails like this:
```
$ ./test/runner cores.test_avx
ninja: Entering directory `/usr/local/google/home/sbc/dev/wasm/llvm-build'
[414/414] Creating library symlink lib/libclang-cpp.so
Test suites:
['test_core']
Running test_core: (1 tests)
(checking sanity from test runner)
shared:INFO: (Emscripten: Running sanity checks)
test_avx (test_core.cores.test_avx) ... clang++: /usr/local/google/home/sbc/dev/wasm/llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:2281: SDValue llvm::WebAssemblyTargetLowering::LowerBUILD_VECTOR(SDValue, SelectionDAG &) const: Assertion `SplatValue == Op->getOperand(0)' failed.
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: /usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang++ -target wasm32-unknown-emscripten -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --sysroot=/usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot -DEMSCRIPTEN -D__SSE__=1 -D__SSE2__=1 -D__SSE3__=1 -D__SSSE3__=1 -D__SSE4_1__=1 -D__SSE4_2__=1 -D__AVX__=1 -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -Werror -Os -msimd128 -fno-lax-vector-conversions -I/usr/local/google/home/sbc/dev/wasm/emscripten/test/sse -Wno-argument-outside-range /usr/local/google/home/sbc/dev/wasm/emscripten/test/sse/test_avx.cpp -c -o /tmp/emscripten_temp_hdrppc_7/test_avx_0.o
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '/usr/local/google/home/sbc/dev/wasm/emscripten/test/sse/test_avx.cpp'.
4. Running pass 'WebAssembly Instruction Selection' on function '@__original_main'
#0 0x00007f494dd87fa8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.20.0git+0x187fa8)
#1 0x00007f494dd85ade llvm::sys::RunSignalHandlers() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.20.0git+0x185ade)
#2 0x00007f494dd87371 llvm::sys::CleanupOnSignal(unsigned long) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.20.0git+0x187371)
#3 0x00007f494dcc4636 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#4 0x00007f494ec591a0 (/lib/x86_64-linux-gnu/libc.so.6+0x3d1a0)
#5 0x00007f494eca70ec __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#6 0x00007f494ec59102 gsignal ./signal/../sysdeps/posix/raise.c:27:6
#7 0x00007f494ec424f2 abort ./stdlib/abort.c:81:7
#8 0x00007f494ec42415 _nl_load_domain ./intl/loadmsgcat.c:1177:9
#9 0x00007f494ec51d32 (/lib/x86_64-linux-gnu/libc.so.6+0x35d32)
#10 0x00007f4952f4ae9d (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMWebAssemblyCodeGen.so.20.0git+0x82e9d)
#11 0x00007f4952f45ec6 llvm::WebAssemblyTargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&) const (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMWebAssemblyCodeGen.so.20.0git+0x7dec6)
#12 0x00007f494d72791c (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) LegalizeDAG.cpp:0:0
#13 0x00007f494d726a66 llvm::SelectionDAG::Legalize() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMSelectionDAG.so.20.0git+0x126a66)
#14 0x00007f494d8e7b8b llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMSelectionDAG.so.20.0git+0x2e7b8b)
#15 0x00007f494d8e5d03 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMSelectionDAG.so.20.0git+0x2e5d03)
#16 0x00007f494d8e30d1 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMSelectionDAG.so.20.0git+0x2e30d1)
#17 0x00007f494d8e08f1 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libLLVMSelectionDAG.so.20.0git+0x2e08f1)
#18 0x00007f4951b5fea7 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMCodeGen.so.20.0git+0x35fea7)
#19 0x00007f494e29480a llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMCore.so.20.0git+0x29480a)
#20 0x00007f494e29cec2 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMCore.so.20.0git+0x29cec2)
#21 0x00007f494e29530c llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMCore.so.20.0git+0x29530c)
#22 0x00007f49522ee0a6 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::__2::unique_ptr<llvm::raw_pwrite_stream, std::__2::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangCodeGen.so.20.0git+0xee0a6)
#23 0x00007f49527374ef clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangCodeGen.so.20.0git+0x5374ef)
#24 0x00007f494b9b9389 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/../lib/libclangParse.so.20.0git+0x39389)
#25 0x00007f495093ee5f clang::FrontendAction::Execute() (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangFrontend.so.20.0git+0x13ee5f)
#26 0x00007f49508a53dd clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangFrontend.so.20.0git+0xa53dd)
#27 0x00007f49534ee648 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangFrontendTool.so.20.0git+0x4648)
#28 0x0000562e2e31c8f3 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang+++0x108f3)
#29 0x0000562e2e3190b8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#30 0x00007f49504d03f9 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__2::optional<llvm::StringRef>>, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char>>*, bool*) const::$_0>(long) Job.cpp:0:0
#31 0x00007f494dcc437e llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libLLVMSupport.so.20.0git+0xc437e)
#32 0x00007f49504cfbb3 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__2::optional<llvm::StringRef>>, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char>>*, bool*) const (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangDriver.so.20.0git+0xcfbb3)
#33 0x00007f495048cc1e clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangDriver.so.20.0git+0x8cc1e)
#34 0x00007f495048cf3e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__2::pair<int, clang::driver::Command const*>>&, bool) const (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangDriver.so.20.0git+0x8cf3e)
#35 0x00007f49504adc5c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__2::pair<int, clang::driver::Command const*>>&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/../lib/libclangDriver.so.20.0git+0xadc5c)
#36 0x0000562e2e3185ee clang_main(int, char**, llvm::ToolContext const&) (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang+++0xc5ee)
#37 0x0000562e2e326fd7 main (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang+++0x1afd7)
#38 0x00007f494ec43b8a __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#39 0x00007f494ec43c45 call_init ./csu/../csu/libc-start.c:128:20
#40 0x00007f494ec43c45 __libc_start_main ./csu/../csu/libc-start.c:347:5
#41 0x0000562e2e316b8a _start (/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang+++0xab8a)
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 20.0.0git (https://github.com/sbc100/llvm-project 08decd20a968ddec459376ef64a4987ef74e15dc)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /usr/local/google/home/sbc/dev/wasm/llvm-build/bin
Build config: +assertions
clang++: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/test_avx-385bbb.cpp
clang++: note: diagnostic msg: /tmp/test_avx-385bbb.sh
clang++: note: diagnostic msg:
********************
em++: error: '/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/clang++ -target wasm32-unknown-emscripten -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --sysroot=/usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot -DEMSCRIPTEN -D__SSE__=1 -D__SSE2__=1 -D__SSE3__=1 -D__SSSE3__=1 -D__SSE4_1__=1 -D__SSE4_2__=1 -D__AVX__=1 -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -Werror -Os -msimd128 -fno-lax-vector-conversions -I/usr/local/google/home/sbc/dev/wasm/emscripten/test/sse -Wno-argument-outside-range /usr/local/google/home/sbc/dev/wasm/emscripten/test/sse/test_avx.cpp -c -o /tmp/emscripten_temp_hdrppc_7/test_avx_0.o' failed (returned 1)
```
[test.zip](https://github.com/user-attachments/files/16487689/test.zip)
https://github.com/llvm/llvm-project/pull/100610
More information about the llvm-commits
mailing list