------- Comment #4 from rguenther at suse dot de 2010-01-03 12:28 ------- Subject: Re: bswap optimization does not work for 32bit (but for 64bit) on 64bit registers
On Sun, 3 Jan 2010, jakub at gcc dot gnu dot org wrote: > ------- Comment #3 from jakub at gcc dot gnu dot org 2010-01-03 12:19 ------- > Shouldn't that be || (bswap32_p && word_mode == SImode) ? expand_unop > will only call expand_doubleword_bswap in that case... Hm, yeah. I wonder why it doesn't try half_mode = smallest_mode_for_size (GET_MODE_PRECISION (mode) / 2, MODE_INT); if (GET_MODE_SIZE (mode) == 2 * GET_MODE_SIZE (half_mode) && optab_handler (unoptab, half_mode)->insn_code != CODE_FOR_nothing) { temp = expand_doubleword_bswap (mode, op0, target); if (temp) return temp; } or similar. Though in practice it might not matter... Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42589