[Bug target/58574] [4.8/4.9 Regression] Wrong code due to s390x machine reorg pass

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 30 11:02:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58574

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'd say the bug is in s390_chunkify_start:
          if (GET_CODE (pat) == PARALLEL && XVECLEN (pat, 0) > 2)
            pat = XVECEXP (pat, 0, 0);
Dunno what exactly the > 2 condition has been added for, JUMP_INSNs with
PARALLEL with XVECLEN (pat, 0) == 2 are:
1) casesi_jump
2) *cmp_and_br_signed_<mode>, *cmp_and_br_unsigned_<mode>,
*icmp_and_br_signed_<mode>, *icmp_and_br_unsigned_<mode>
3) *ccraw_to_int
I can understand why you wouldn't want to handle 1) in there, and supposedly
3) should be split before machine reorg or worst case at the start of it.  But
2), this case, it looks wrong not to do anything here.

Note that similar condition is in s390_split_branches, no idea what do you want
to do there.  But perhaps TARGET_Z10 implies TARGET_ZARCH and thus
s390_split_branches would be never called.



More information about the Gcc-bugs mailing list