Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firefox fails to build with ICE in src/gl.cc with clang-19 #110374

Closed
stefson opened this issue Sep 28, 2024 · 12 comments · Fixed by #122463
Closed

firefox fails to build with ICE in src/gl.cc with clang-19 #110374

stefson opened this issue Sep 28, 2024 · 12 comments · Fixed by #122463
Labels
crash-on-valid llvm:SelectionDAG SelectionDAGISel as well

Comments

@stefson
Copy link

stefson commented Sep 28, 2024

from the build log, I think this is the error:

179:48.20   cargo:warning=fatal error: error in backend: Do not know how to scalarize the result of this operator!
179:48.20   cargo:warning=
179:48.21   cargo:warning=PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
179:48.22   cargo:warning=Stack dump:
179:48.33   cargo:warning=0.	Program arguments: /usr/lib/llvm/19/bin/armv7a-unknown-linux-musleabihf-clang++-19 -O2 -ffunction-sections -fdata-sections -fPIC --target=armv7a-unknown-linux-musleabihf -I/var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/dist/stl_wrappers -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -I/var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/dist/include -I/usr/include/nspr -I/usr/include/nss -I/usr/include/nspr -I/var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/dist/include/nss -I/usr/include/libpng16 -I/usr/include/pixman-1 -DMOZILLA_CLIENT -include /var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/mozilla-config.h -mfloat-abi=hard -fno-rtti -pthread -fno-sized-deallocation -fno-aligned-new -ffunction-sections -fdata-sections -fno-math-errno -fno-exceptions -fPIC -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fomit-frame-pointer -O2 -fomit-frame-pointer -funwind-tables -Wno-error=tautological-type-limit-compare -Wno-invalid-offsetof -Wno-range-loop-analysis -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off -DMOZILLA_CONFIG_H -I /var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox-131.0/gfx/wr/swgl/../webrender/res -I src -I /var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-3e66616cdca95a28/out -std=c++17 -fno-exceptions -fno-rtti -fno-math-errno -UMOZILLA_CONFIG_H -ffast-math -mrecip=none -fno-finite-math-only -D_GLIBCXX_USE_CXX11_ABI=0 -o /var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-3e66616cdca95a28/out/2e40c9e35e9506f4-gl.o -c src/gl.cc
179:48.33   cargo:warning=1.	<eof> parser at end of file
179:48.33   cargo:warning=2.	Code generation
179:48.34   cargo:warning=3.	Running pass 'Function Pass Manager' on module 'src/gl.cc'.
179:48.35   cargo:warning=4.	Running pass 'ARM Instruction Selection' on function '@_ZN25cs_blur_ALPHA_TARGET_frag15swgl_drawSpanR8Ev'
179:48.36   cargo:warning=armv7a-unknown-linux-musleabihf-clang++-19: error: clang frontend command failed with exit code 70 (use -v to see invocation)
179:48.36   cargo:warning=clang version 19.1.0
179:48.36   cargo:warning=Target: armv7a-unknown-linux-musleabihf
179:48.37   cargo:warning=Thread model: posix
179:48.37   cargo:warning=InstalledDir: /usr/lib/llvm/19/bin
179:48.38   cargo:warning=Configuration file: /etc/clang/armv7a-unknown-linux-musleabihf-clang++.cfg
179:48.38   cargo:warning=armv7a-unknown-linux-musleabihf-clang++-19: note: diagnostic msg:
179:48.39   cargo:warning=********************
179:48.39   cargo:warning=
179:48.40   cargo:warning=PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
179:48.40   cargo:warning=Preprocessed source(s) and associated run script(s) are located at:
179:48.41   cargo:warning=armv7a-unknown-linux-musleabihf-clang++-19: note: diagnostic msg: /var/tmp/portage/www-client/firefox-131.0_rc1/temp/gl-a0fb08.cpp
179:48.42   cargo:warning=armv7a-unknown-linux-musleabihf-clang++-19: note: diagnostic msg: /var/tmp/portage/www-client/firefox-131.0_rc1/temp/gl-a0fb08.sh
179:48.42   cargo:warning=armv7a-unknown-linux-musleabihf-clang++-19: note: diagnostic msg:
179:48.43   cargo:warning=
179:48.43   cargo:warning=********************
179:48.43   --- stderr

here is the full compressed build log: build.log.gz

and here is the preprocessed sources, and the reproducer: preprocess.tar.gz

@stefson
Copy link
Author

stefson commented Sep 28, 2024

there were some reports of musttail errors in various issues over the last week, ccing @ostannard as he is working on them.

I'm happy to test any patches

@llvmbot
Copy link
Member

llvmbot commented Sep 28, 2024

@llvm/issue-subscribers-backend-arm

Author: None (stefson)

from the build log, I think this is the error:
179:48.20   cargo:warning=fatal error: error in backend: Do not know how to scalarize the result of this operator!
179:48.20   cargo:warning=
179:48.21   cargo:warning=PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
179:48.22   cargo:warning=Stack dump:
179:48.33   cargo:warning=0.	Program arguments: /usr/lib/llvm/19/bin/armv7a-unknown-linux-musleabihf-clang++-19 -O2 -ffunction-sections -fdata-sections -fPIC --target=armv7a-unknown-linux-musleabihf -I/var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/dist/stl_wrappers -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -I/var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/dist/include -I/usr/include/nspr -I/usr/include/nss -I/usr/include/nspr -I/var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/dist/include/nss -I/usr/include/libpng16 -I/usr/include/pixman-1 -DMOZILLA_CLIENT -include /var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/mozilla-config.h -mfloat-abi=hard -fno-rtti -pthread -fno-sized-deallocation -fno-aligned-new -ffunction-sections -fdata-sections -fno-math-errno -fno-exceptions -fPIC -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fomit-frame-pointer -O2 -fomit-frame-pointer -funwind-tables -Wno-error=tautological-type-limit-compare -Wno-invalid-offsetof -Wno-range-loop-analysis -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off -DMOZILLA_CONFIG_H -I /var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox-131.0/gfx/wr/swgl/../webrender/res -I src -I /var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-3e66616cdca95a28/out -std=c++17 -fno-exceptions -fno-rtti -fno-math-errno -UMOZILLA_CONFIG_H -ffast-math -mrecip=none -fno-finite-math-only -D_GLIBCXX_USE_CXX11_ABI=0 -o /var/tmp/portage/www-client/firefox-131.0_rc1/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-3e66616cdca95a28/out/2e40c9e35e9506f4-gl.o -c src/gl.cc
179:48.33   cargo:warning=1.	&lt;eof&gt; parser at end of file
179:48.33   cargo:warning=2.	Code generation
179:48.34   cargo:warning=3.	Running pass 'Function Pass Manager' on module 'src/gl.cc'.
179:48.35   cargo:warning=4.	Running pass 'ARM Instruction Selection' on function '@<!-- -->_ZN25cs_blur_ALPHA_TARGET_frag15swgl_drawSpanR8Ev'
179:48.36   cargo:warning=armv7a-unknown-linux-musleabihf-clang++-19: error: clang frontend command failed with exit code 70 (use -v to see invocation)
179:48.36   cargo:warning=clang version 19.1.0
179:48.36   cargo:warning=Target: armv7a-unknown-linux-musleabihf
179:48.37   cargo:warning=Thread model: posix
179:48.37   cargo:warning=InstalledDir: /usr/lib/llvm/19/bin
179:48.38   cargo:warning=Configuration file: /etc/clang/armv7a-unknown-linux-musleabihf-clang++.cfg
179:48.38   cargo:warning=armv7a-unknown-linux-musleabihf-clang++-19: note: diagnostic msg:
179:48.39   cargo:warning=********************
179:48.39   cargo:warning=
179:48.40   cargo:warning=PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
179:48.40   cargo:warning=Preprocessed source(s) and associated run script(s) are located at:
179:48.41   cargo:warning=armv7a-unknown-linux-musleabihf-clang++-19: note: diagnostic msg: /var/tmp/portage/www-client/firefox-131.0_rc1/temp/gl-a0fb08.cpp
179:48.42   cargo:warning=armv7a-unknown-linux-musleabihf-clang++-19: note: diagnostic msg: /var/tmp/portage/www-client/firefox-131.0_rc1/temp/gl-a0fb08.sh
179:48.42   cargo:warning=armv7a-unknown-linux-musleabihf-clang++-19: note: diagnostic msg:
179:48.43   cargo:warning=
179:48.43   cargo:warning=********************
179:48.43   --- stderr

here is the full compressed build log: build.log.gz

and here is the preprocessed sources, and the reproducer: preprocess.tar.gz

@EugeneZelenko EugeneZelenko added the needs-reduction Large reproducer that should be reduced into a simpler form label Sep 28, 2024
@ostannard
Copy link
Collaborator

fatal error: error in backend: Do not know how to scalarize the result of this operator!

This error doesn't look obviously related to the musttail bugs I have been working on, but if you think it's relevant then you could test with #109943.

@stefson
Copy link
Author

stefson commented Oct 3, 2024

yeah I think you're right, the only part of firefox using clang::musttail is skia

I could need some help with reducing, never had an issue like that before with llvm - is there a guide somewhere on what to do?

@ostannard
Copy link
Collaborator

There's a tool called creduce which is very useful for reducing compiler test cases: https://github.com/csmith-project/creduce. Unfortunately it's documentation site has been down for a while, but archive.org has it: https://web.archive.org/web/20201204141133/https://embed.cs.utah.edu/creduce/using/

@Endilll
Copy link
Contributor

Endilll commented Oct 3, 2024

One thing creduce tutorials typically don't speak of is how to preserve original identifiers. Single-character identifiers make it hard to read any snippet longer than 5 lines. Here are creduce arguments you need to pass:

--remove-pass pass_clang rename-fun --remove-pass pass_clang rename-param --remove-pass pass_clang rename-var --remove-pass pass_clang rename-class --remove-pass pass_clang rename-cxx-method --remove-pass pass_clex rename-toks

@davemgreen
Copy link
Collaborator

That looks like a really big case that might take a while to reduce from C. With a mixture of -emit-llvm, running it through llc and isolating the function that was going wrong I managed to get it down to this:
https://godbolt.org/z/Th63E5cqr

It fails with ScalarizeVectorResult #0: t98: v1i16 = AssertZext t96, ValueType:ch:i8. It obviously shouldn't be failing, but I believe it might come from a mismatch between using vector types (template <typename T, int N> using VectorType = T __attribute__((ext_vector_type(N)));) and having Neon disabled. The AssertZext should be able to scalarize without any legal vector types.

@stefson
Copy link
Author

stefson commented Nov 21, 2024

I've compiled a llvm-20 toolchain to check if the error was fixed recently, and it fails as before:

/usr/lib/llvm/20/bin/armv7a-unknown-linux-musleabihf-clang++-20 -O2 -ffunction-sections -fdata-sections -fPIC --target=armv7a-unknown-linux-musleabihf -I/var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/stl_wrappers -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstrict-flex-arrays=1 -DNDEBUG=1 -DTRIMMED=1 -I/var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/include -I/usr/include/nspr -I/usr/include/nss -I/usr/include/nspr -I/var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/include/nss -I/usr/include/libpng16 -I/usr/include/pixman-1 -DMOZILLA_CLIENT -include /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/mozilla-config.h -mfloat-abi=hard -fno-rtti -pthread -fno-sized-deallocation -fno-aligned-new -ffunction-sections -fdata-sections -fno-math-errno -fno-exceptions -fPIC -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fomit-frame-pointer -O2 -fomit-frame-pointer -funwind-tables -Wno-error=tautological-type-limit-compare -Wno-invalid-offsetof -Wno-range-loop-analysis -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off -DMOZILLA_CONFIG_H -I /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox-132.0.1/gfx/wr/swgl/../webrender/res -I src -I /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-029fb04aeb3e0fe7/out -std=c++17 -fno-exceptions -fno-rtti -fno-math-errno -UMOZILLA_CONFIG_H -ffast-math -mrecip=none -fno-finite-math-only -D_GLIBCXX_USE_CXX11_ABI=0 -o /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-029fb04aeb3e0fe7/out/2e40c9e35e9506f4-gl.o -c src/gl.cc -v
clang version 20.0.0git0e907c17
Target: armv7a-unknown-linux-musleabihf
Thread model: posix
InstalledDir: /usr/lib/llvm/20/bin
Configuration file: /etc/clang/armv7a-unknown-linux-musleabihf-clang++.cfg
System configuration file directory: /etc/clang
Selected GCC installation: /usr/lib/gcc/armv7a-unknown-linux-musleabihf/13
Candidate multilib: .;@m32
Selected multilib: .;@m32
 (in-process)
 "/usr/lib/llvm/20/bin/clang-20" -cc1 -triple armv7-unknown-linux-musleabihf -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name gl.cc -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=none -relaxed-aliasing -fapprox-func -funsafe-math-optimizations -fno-signed-zeros -mreassociate -freciprocal-math -ffp-contract=fast -fno-rounding-math -mrecip=none -complex-range=basic -mconstructor-aliases -funwind-tables=1 -target-cpu generic -target-feature +vfp2 -target-feature +vfp2sp -target-feature -vfp3 -target-feature +vfp3d16 -target-feature +vfp3d16sp -target-feature -vfp3sp -target-feature -fp16 -target-feature -vfp4 -target-feature -vfp4d16 -target-feature -vfp4d16sp -target-feature -vfp4sp -target-feature -fp-armv8 -target-feature -fp-armv8d16 -target-feature -fp-armv8d16sp -target-feature -fp-armv8sp -target-feature -fullfp16 -target-feature +fp64 -target-feature -d32 -target-feature -neon -target-feature -sha2 -target-feature -aes -target-feature -fp16fml -target-abi aapcs-linux -mfloat-abi hard -debugger-tuning=gdb -fdebug-compilation-dir=/var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox-132.0.1/gfx/wr/swgl -v -ffunction-sections -fdata-sections -fcoverage-compilation-dir=/var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox-132.0.1/gfx/wr/swgl -resource-dir /usr/lib/llvm/20/bin/../../../../lib/clang/20 -include /usr/include/gentoo/fortify.h -include /usr/include/gentoo/maybe-stddefs.h -include /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/mozilla-config.h -I /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/stl_wrappers -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -D NDEBUG=1 -D TRIMMED=1 -I /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/include -I /usr/include/nspr -I /usr/include/nss -I /usr/include/nspr -I /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/include/nss -I /usr/include/libpng16 -I /usr/include/pixman-1 -D MOZILLA_CLIENT -D MOZILLA_CONFIG_H -I /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox-132.0.1/gfx/wr/swgl/../webrender/res -I src -I /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-029fb04aeb3e0fe7/out -U MOZILLA_CONFIG_H -D _GLIBCXX_USE_CXX11_ABI=0 -internal-isystem /usr/lib/gcc/armv7a-unknown-linux-musleabihf/13/include/g++-v13 -internal-isystem /usr/lib/gcc/armv7a-unknown-linux-musleabihf/13/include/g++-v13/armv7a-unknown-linux-musleabihf -internal-isystem /usr/lib/gcc/armv7a-unknown-linux-musleabihf/13/include/g++-v13/backward -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/armv7a-unknown-linux-musleabihf/13/../../../../armv7a-unknown-linux-musleabihf/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -internal-isystem /usr/lib/llvm/20/bin/../../../../lib/clang/20/include -O2 -Wno-error=tautological-type-limit-compare -Wno-invalid-offsetof -Wno-range-loop-analysis -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -std=c++17 -fdeprecated-macro -ferror-limit 19 -fvisibility=hidden -fvisibility-inlines-hidden -fstrict-flex-arrays=1 -pthread -stack-protector 2 -fno-rtti -fno-signed-char -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fno-sized-deallocation -fno-aligned-allocation -fcolor-diagnostics -vectorize-loops -vectorize-slp -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-029fb04aeb3e0fe7/out/2e40c9e35e9506f4-gl.o -x c++ src/gl.cc
clang -cc1 version 20.0.0git0e907c17 based upon LLVM 20.0.0git0e907c17 default target armv7a-unknown-linux-musleabihf
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/armv7a-unknown-linux-musleabihf/13/../../../../armv7a-unknown-linux-musleabihf/include"
ignoring nonexistent directory "/include"
ignoring duplicate directory "/usr/include/nspr"
#include "..." search starts here:
#include <...> search starts here:
 /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/stl_wrappers
 /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/include
 /usr/include/nspr
 /usr/include/nss
 /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/include/nss
 /usr/include/libpng16
 /usr/include/pixman-1
 /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox-132.0.1/gfx/wr/swgl/../webrender/res
 src
 /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-029fb04aeb3e0fe7/out
 /usr/lib/gcc/armv7a-unknown-linux-musleabihf/13/include/g++-v13
 /usr/lib/gcc/armv7a-unknown-linux-musleabihf/13/include/g++-v13/armv7a-unknown-linux-musleabihf
 /usr/lib/gcc/armv7a-unknown-linux-musleabihf/13/include/g++-v13/backward
 /usr/include
 /usr/lib/llvm/20/bin/../../../../lib/clang/20/include
End of search list.
fatal error: error in backend: Do not know how to scalarize the result of this operator!

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/lib/llvm/20/bin/armv7a-unknown-linux-musleabihf-clang++-20 -O2 -ffunction-sections -fdata-sections -fPIC --target=armv7a-unknown-linux-musleabihf -I/var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/stl_wrappers -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstrict-flex-arrays=1 -DNDEBUG=1 -DTRIMMED=1 -I/var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/include -I/usr/include/nspr -I/usr/include/nss -I/usr/include/nspr -I/var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/dist/include/nss -I/usr/include/libpng16 -I/usr/include/pixman-1 -DMOZILLA_CLIENT -include /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/mozilla-config.h -mfloat-abi=hard -fno-rtti -pthread -fno-sized-deallocation -fno-aligned-new -ffunction-sections -fdata-sections -fno-math-errno -fno-exceptions -fPIC -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fomit-frame-pointer -O2 -fomit-frame-pointer -funwind-tables -Wno-error=tautological-type-limit-compare -Wno-invalid-offsetof -Wno-range-loop-analysis -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off -DMOZILLA_CONFIG_H -I /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox-132.0.1/gfx/wr/swgl/../webrender/res -I src -I /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-029fb04aeb3e0fe7/out -std=c++17 -fno-exceptions -fno-rtti -fno-math-errno -UMOZILLA_CONFIG_H -ffast-math -mrecip=none -fno-finite-math-only -D_GLIBCXX_USE_CXX11_ABI=0 -o /var/tmp/portage/www-client/firefox-132.0.1-r2/work/firefox_build/armv7a-unknown-linux-musleabihf/release/build/swgl-029fb04aeb3e0fe7/out/2e40c9e35e9506f4-gl.o -c src/gl.cc -v
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'src/gl.cc'.
4.      Running pass 'ARM Instruction Selection' on function '@_ZN25cs_blur_ALPHA_TARGET_frag15swgl_drawSpanR8Ev'
armv7a-unknown-linux-musleabihf-clang++-20: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 20.0.0git0e907c17
Target: armv7a-unknown-linux-musleabihf
Thread model: posix
InstalledDir: /usr/lib/llvm/20/bin
Configuration file: /etc/clang/armv7a-unknown-linux-musleabihf-clang++.cfg
armv7a-unknown-linux-musleabihf-clang++-20: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
armv7a-unknown-linux-musleabihf-clang++-20: note: diagnostic msg: /tmp/gl-ffed9e.cpp
armv7a-unknown-linux-musleabihf-clang++-20: note: diagnostic msg: /tmp/gl-ffed9e.sh
armv7a-unknown-linux-musleabihf-clang++-20: note: diagnostic msg: 

@thesamesam thesamesam added crash-on-valid and removed needs-reduction Large reproducer that should be reduced into a simpler form labels Nov 22, 2024
@stefson
Copy link
Author

stefson commented Dec 29, 2024

I've compiled weekly snapshots of the 19.x branch for the last days, and have the regression range down to one week:

https://github.com/llvm/llvm-project/compare/0b9f2847da79298ed09c29493245113f02b32d9f..1bad7024561bc64ed4bfda0772b16376b475eba5

@glandium
Copy link
Contributor

glandium commented Jan 1, 2025

I narrowed it down to 6b76c1e.

@glandium
Copy link
Contributor

glandium commented Jan 1, 2025

Cc: @nikic

@davemgreen
Copy link
Collaborator

There is a reduced example here: https://godbolt.org/z/aYYTGxWWv
The same thing happens for other architectures that do not have vectors, like for example with x64: https://godbolt.org/z/rnKa8d9vn

@EugeneZelenko EugeneZelenko added llvm:SelectionDAG SelectionDAGISel as well and removed backend:ARM labels Jan 11, 2025
BaiXilin pushed a commit to BaiXilin/llvm-fix-vnni-instr-types that referenced this issue Jan 12, 2025
With range and undef metadata on a call we can have vector AssertZExt
generated on a target with no vector operations. The AssertZExt needs to
scalarize to a normal `AssertZext tin, ValueType`. I have added
AssertSext too, although I do not have a test case.

Fixes llvm#110374
tru pushed a commit to llvmbot/llvm-project that referenced this issue Jan 13, 2025
With range and undef metadata on a call we can have vector AssertZExt
generated on a target with no vector operations. The AssertZExt needs to
scalarize to a normal `AssertZext tin, ValueType`. I have added
AssertSext too, although I do not have a test case.

Fixes llvm#110374

(cherry picked from commit ab9a80a)
tru pushed a commit to llvmbot/llvm-project that referenced this issue Jan 14, 2025
With range and undef metadata on a call we can have vector AssertZExt
generated on a target with no vector operations. The AssertZExt needs to
scalarize to a normal `AssertZext tin, ValueType`. I have added
AssertSext too, although I do not have a test case.

Fixes llvm#110374

(cherry picked from commit ab9a80a)
tru pushed a commit to llvmbot/llvm-project that referenced this issue Jan 14, 2025
With range and undef metadata on a call we can have vector AssertZExt
generated on a target with no vector operations. The AssertZExt needs to
scalarize to a normal `AssertZext tin, ValueType`. I have added
AssertSext too, although I do not have a test case.

Fixes llvm#110374

(cherry picked from commit ab9a80a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash-on-valid llvm:SelectionDAG SelectionDAGISel as well
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants