From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C322C3858412; Wed, 20 Sep 2023 11:39:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C322C3858412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695209987; bh=62b7dZfvAigA66JieSZS/N4BRnyXYic8ytXJtYe07Gg=; h=From:To:Subject:Date:From; b=aJN1fzTC7cfbsTTUu9fdHlQWVWWuKA/gbF7ExoKK/X0UemrUR89qNI+jGJUCHwgFo JugXtlbTOkXx81aYvDTB00dBc9F8xqh0subkthxDHjwnnhDzCv9IdoHEakCKdSS/hI oOqFdUmHfrpdpa2neGaRl9epbnBzXkLPoIi2KUJ4= From: "sjames at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111495] New: [14 regression] ICE in lower_bound, at value-range.h:1078 when building LLVM 17.0.1 Date: Wed, 20 Sep 2023 11:39:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sjames at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111495 Bug ID: 111495 Summary: [14 regression] ICE in lower_bound, at value-range.h:1078 when building LLVM 17.0.1 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Created attachment 55947 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55947&action=3Dedit InstructionSimplify.cpp.ii ``` Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/libexec/gcc/aarch64-unknown-linux-gnu/14/lto-wra= pper Target: aarch64-unknown-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-14.0.0.9999/work/gcc-14.0.0.9999/configure --host=3Daarch64-unknown-linux-gnu --build=3Daarch64-unknown-linux-gnu --prefix=3D/usr --bindir=3D/usr/aarch64-unknown-linux-gnu/gcc-bin/14 --includedir=3D/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include --datadir=3D/usr/share/gcc-data/aarch64-unknown-linux-gnu/14 --mandir=3D/usr/share/gcc-data/aarch64-unknown-linux-gnu/14/man --infodir=3D/usr/share/gcc-data/aarch64-unknown-linux-gnu/14/info --with-gxx-include-dir=3D/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/= g++-v14 --disable-silent-rules --disable-dependency-tracking --with-python-dir=3D/share/gcc-data/aarch64-unknown-linux-gnu/14/python --enable-languages=3Dc,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=3Dyes,extra,rtl --with-bugurl=3Dhttps://bugs.gentoo.org/ --with-pkgversion=3D'Gentoo 14.0.0= p, commit d0b55776a4e1d2f293db5ba0e4a04aefed055ec4' --with-gcc-major-version-o= nly --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=3Dposix --enable-__cxa_atexit --enable-clocale=3Dgnu --disable-multilib --disable-fixed-point --enable-libgomp --disable-libssp --disable-libada --disable-cet --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --without-isl --enable-default-pie --enable-host-pie --disable-host-bind-now --enable-default-ssp Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20230920 (experimental) 2e36eedb244badaaf2a70388071115c851b8db9b (Gentoo 14.0.0 p, commit d0b55776a4e1d2f293db5ba0e4a04aefed055ec4) ``` ``` FAILED: lib/Analysis/CMakeFiles/LLVMAnalysis.dir/InstructionSimplify.cpp.o /usr/bin/aarch64-unknown-linux-gnu-g++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACR= OS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-17.0.1/work/llvm_build-.arm64/lib/Analysis -I/var/tmp/portage/sys-devel/llvm-17.0.1/work/llvm/lib/Analysis -I/var/tmp/portage/sys-devel/llvm-17.0.1/work/llvm_build-.arm64/include -I/var/tmp/portage/sys-devel/llvm-17.0.1/work/llvm/include -DNDEBUG -O3 -p= ipe -mcpu=3Dnative -fdiagnostics-color=3Dalways -ggdb3 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=3Ddate-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -std=3Dc++17 -fdiagnostics-color=3Dalwa= ys -MD -MT lib/Analysis/CMakeFiles/LLVMAnalysis.dir/InstructionSimplify.cpp.o -MF lib/Analysis/CMakeFiles/LLVMAnalysis.dir/InstructionSimplify.cpp.o.d -o lib/Analysis/CMakeFiles/LLVMAnalysis.dir/InstructionSimplify.cpp.o -c /var/tmp/portage/sys-devel/llvm-17.0.1/work/llvm/lib/Analysis/InstructionSi= mplify.cpp during GIMPLE pass: vrp /var/tmp/portage/sys-devel/llvm-17.0.1/work/llvm/lib/Analysis/InstructionSi= mplify.cpp: In function =E2=80=98llvm::Value* simplifyInstructionWithOperands(llvm::Ins= truction*, llvm::ArrayRef, const llvm::SimplifyQuery&, unsigned int)=E2= =80=99: /var/tmp/portage/sys-devel/llvm-17.0.1/work/llvm/lib/Analysis/InstructionSi= mplify.cpp:6809:15: internal compiler error: in lower_bound, at value-range.h:1078 6809 | static Value *simplifyInstructionWithOperands(Instruction *I, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0xaaaaae7fa197 irange::lower_bound(unsigned int) const =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/value-range.h:= 1078 0xaaaaae7fa197 gimple_simplify_EXACT_DIV_EXPR(gimple_match_op*, gimple**, tree_node* (*)(tree_node*), code_helper, tree_node*, tree_node*, tree_node*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/build/gcc/gimple-match-2.cc:8278 0xaaaaadcbc307 gimple_resimplify2 =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/gimple-match-e= xports.cc:1001 0xaaaaadcbcf2f gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_no= de* (*)(tree_node*), tree_node* (*)(tree_node*)) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/gimple-match-e= xports.cc:868 0xaaaaad1fa8b7 fold_stmt_1 =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/gimple-fold.cc= :6355 0xaaaaae56b1c7 gimple_ranger::fold_stmt(gimple_stmt_iterator*, tree_node* (*)(tree_node*)) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/gimple-range.c= c:470 0xaaaaad94be7b rvrp_folder::fold_stmt(gimple_stmt_iterator*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-vrp.cc:10= 32 0xaaaaad82107b substitute_and_fold_dom_walker::before_dom_children(basic_block_def*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-propa= gate.cc:876 0xaaaaae51619b dom_walker::walk(basic_block_def*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/domwalk.cc:311 0xaaaaad8200bf substitute_and_fold_engine::substitute_and_fold(basic_block_def*) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-propa= gate.cc:999 0xaaaaad948a0f execute_ranger_vrp(function*, bool, bool) =20=20=20=20=20=20=20 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-vrp.cc:10= 62 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. ``` Might be a dupe of PR111482. Maybe the test case is still useful if it is. I can reproduce with just 'g++ -c InstructionSimplify.cpp.ii -O3'.=