https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97546
Bug ID: 97546 Summary: [SVE] ICE with -fenable-tree-bswap Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: adhemerval.zanella at linaro dot org Target Milestone: --- The reduced testcase: -- #include <arm_sve.h> static svbool_t visinf_vo_vf(svfloat32_t d) { return svcmpeq_n_f32 (svptrue_b8 (), svabs_f32_x (svptrue_b8 (), d), __builtin_inff ()); } const svint32_t _ZGVsNxv_ilogbf(svfloat32_t d) { svint32_t e = svreinterpret_s32_f32 (svdup_n_f32 (0.0f)); e = svsel_s32 (svcmpne_f32 (svptrue_b8(), d, d), svdup_n_s32 (2147483647), e); e = svsel_s32 (visinf_vo_vf (d), svdup_n_s32 (0x7fffffff), e); return e; } -- ICE with gcc with: $ aarch64-unknown-linux-gnu-gcc -march=armv8.2-a+sve reproducer.c -c -O1 -fenable-tree-bswap cc1: note: enable pass tree-bswap for functions in the range of [0, 4294967295] during GIMPLE pass: bswap reproducer.c: In function ‘_ZGVsNxv_ilogbf’: reproducer.c:81:17: internal compiler error: tree check: expected integer_cst, have poly_int_cst in find_bswap_or_nop, at gimple-ssa-store-merging.c:859 81 | const svint32_t _ZGVsNxv_ilogbf(svfloat32_t d) | ^~~~~~~~~~~~~~~ 0x692107 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc-git-master/gcc/tree.c:9731 0x1849ed3 tree_int_cst_elt_check(tree_node*, int, char const*, int, char const*) ../../gcc-git-master/gcc/tree.h:3503 0x1849ed3 find_bswap_or_nop ../../gcc-git-master/gcc/gimple-ssa-store-merging.c:859 0x1849ed3 execute ../../gcc-git-master/gcc/gimple-ssa-store-merging.c:1261 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.