https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104249
Bug ID: 104249 Summary: [12 regression] RTL failure with checks turned on after r12-6848 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: seurer at gcc dot gnu.org Target Milestone: --- g:4343f5e256791a5abaaef29fe1f831a03bab129e, r12-6848 libtool: compile: /home/seurer/gcc/git/build/gcc-test/./gcc/xgcc -B/home/seurer/gcc/git/build/gcc-test/./gcc/ -B/home/seurer/gcc/git/install/gcc-test/powerpc64le-unknown-linux-gnu/bin/ -B/home/seurer/gcc/git/install/gcc-test/powerpc64le-unknown-linux-gnu/lib/ -isystem /home/seurer/gcc/git/install/gcc-test/powerpc64le-unknown-linux-gnu/include -isystem /home/seurer/gcc/git/install/gcc-test/powerpc64le-unknown-linux-gnu/sys-include -fchecking=1 -DHAVE_CONFIG_H -I. -I/home/seurer/gcc/git/gcc-test/libquadmath -I /home/seurer/gcc/git/gcc-test/libquadmath/../include -mno-gnu-attribute -g -O2 -MT math/llrintq.lo -MD -MP -MF math/.deps/llrintq.Tpo -c /home/seurer/gcc/git/gcc-test/libquadmath/math/llrintq.c -fPIC -DPIC -o math/.libs/llrintq.o during RTL pass: expand In file included from /usr/include/fenv.h:145, from /home/seurer/gcc/git/gcc-test/libquadmath/quadmath-imp.h:32, from /home/seurer/gcc/git/gcc-test/libquadmath/math/llrintq.c:22: /home/seurer/gcc/git/gcc-test/libquadmath/math/llrintq.c: In function 'llrintq': /home/seurer/gcc/git/gcc-test/libquadmath/math/llrintq.c:55:11: internal compiler error: RTL check: expected code 'const_int', have 'reg' in gen_feraiseexceptsi, at config/rs6000/rs6000.md:7010 55 | feraiseexcept (t == LLONG_MAX ? FE_INEXACT : FE_INVALID); | ^~~~~~~~~~~~~ 0x102477a7 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, char const*) /home/seurer/gcc/git/gcc-test/gcc/rtl.cc:916 0x1179d69b gen_feraiseexceptsi(rtx_def*, rtx_def*) /home/seurer/gcc/git/gcc-test/gcc/config/rs6000/rs6000.md:7010 0x1046b7f3 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*, rtx_def*) const /home/seurer/gcc/git/gcc-test/gcc/recog.h:407 0x1046b7f3 expand_builtin_feclear_feraise_except /home/seurer/gcc/git/gcc-test/gcc/builtins.cc:2606 0x1048e283 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) /home/seurer/gcc/git/gcc-test/gcc/builtins.cc:7129 0x106a7b8f expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /home/seurer/gcc/git/gcc-test/gcc/expr.cc:11536 0x104c8dd3 expand_expr /home/seurer/gcc/git/gcc-test/gcc/expr.h:301 0x104c8dd3 expand_call_stmt /home/seurer/gcc/git/gcc-test/gcc/cfgexpand.cc:2831 0x104c8dd3 expand_gimple_stmt_1 /home/seurer/gcc/git/gcc-test/gcc/cfgexpand.cc:3864 0x104c8dd3 expand_gimple_stmt /home/seurer/gcc/git/gcc-test/gcc/cfgexpand.cc:4028 0x104d1857 expand_gimple_basic_block /home/seurer/gcc/git/gcc-test/gcc/cfgexpand.cc:6069 0x104d40a7 execute /home/seurer/gcc/git/gcc-test/gcc/cfgexpand.cc:6795 commit 4343f5e256791a5abaaef29fe1f831a03bab129e (HEAD) Author: Raoni Fassina Firmino <ra...@linux.ibm.com> Date: Thu Jan 13 14:08:53 2022 -0300 rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]