$ gcc -O1 -S pr28776-2.c gcc/testsuite/gcc.c-torture/compile/pr28776-2.c: In function 'encode_line': gcc/testsuite/gcc.c-torture/compile/pr28776-2.c:26:1: internal compiler error: in decompose, at rtl.h:2126 0x9fac75 wi::int_traits<std::pair<rtx_def*, machine_mode> >::decompose(long*, unsigned int, std::pair<rtx_def*, machine_mode> const&) gcc/rtl.h:2124 0xa33264 wide_int_ref_storage<false>::wide_int_ref_storage<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*, machine_mode> const&, unsigned int) gcc/wide-int.h:976 0xa33212 generic_wide_int<wide_int_ref_storage<false> >::generic_wide_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*, machine_mode> const&, unsigned int) gcc/wide-int.h:753 0xe36629 bool wi::eq_p<std::pair<rtx_def*, machine_mode>, std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*, machine_mode> const&, std::pair<rtx_def*, machine_mode> const&) gcc/wide-int.h:1747 0xe31241 simplify_const_relational_operation(rtx_code, machine_mode, rtx_def*, rtx_def*) gcc/simplify-rtx.c:5131 0xe2fd0c simplify_relational_operation(rtx_code, machine_mode, machine_mode, rtx_def*, rtx_def*) gcc/simplify-rtx.c:4614 0xe32d00 simplify_ternary_operation(rtx_code, machine_mode, machine_mode, rtx_def*, rtx_def*, rtx_def*) gcc/simplify-rtx.c:5641 0x1467932 combine_simplify_rtx gcc/combine.c:5599 0x14676c3 subst gcc/combine.c:5517 0x1467472 subst gcc/combine.c:5462 0x1460c6e try_combine gcc/combine.c:3332 0x145b790 combine_instructions gcc/combine.c:1294 0x147ee78 rest_of_handle_combine gcc/combine.c:14663 0x147ef38 execute gcc/combine.c:14708
Happens on this rtl: ... #13 0x0000000001467933 in combine_simplify_rtx (x=0x7ffff7424c20, op0_mode=BImode, in_dest=0, in_cond=0) at gcc/combine.c:5599 5599 XEXP (x, 1), XEXP (x, 2)); (gdb) call debug_rtx (x) (if_then_else (lt:BI (const_int -2147483648 [0xffffffff80000000]) (const_int 0 [0])) (label_ref 13) (pc)) ...
https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01596.html
Unfortunately, haven't been able to reproduce this with an upstream branch yet.
Author: vries Date: Mon Nov 20 08:20:35 2017 New Revision: 254944 URL: https://gcc.gnu.org/viewcvs?rev=254944&root=gcc&view=rev Log: Fix comparison mode in simplify_ternary_operation 2017-11-20 Tom de Vries <tom@codesourcery.com> PR rtl-optimization/82020 * simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of IF_THEN_ELSE condition. Modified: trunk/gcc/ChangeLog trunk/gcc/simplify-rtx.c
Patch committed to trunk, test-case not required. Marking resolved-fixed.