> From: Richard Biener [mailto:rguent...@suse.de] > Sent: Friday, January 23, 2015 6:01 PM > > + if (bswap && n->range == 16) > > + bswap_type = TYPE_UNSIGNED (TREE_TYPE (src)) ? > short_unsigned_type_node > > + : > short_integer_type_node; > > I don't think using short_unsigned_type_node or > short_integer_type_node > is correct - that depends on the SHORT_TYPE_SIZE target macro which > may very well not match HImode.
Indeed, my mistake. What about intHI_type_node and unsigned_intHI_type_node? > > I think for the rotation itself whether the type is signed or unsigned > doesn't matter and the bswap builtins expect unsigned input. So I think > you should use an unsigned type unconditionally. Ok then only unsigned_intHI_type_node. > > Which means you can simply use build_nonstandard_integer_type (16, > 1); > or even bswap_type as-is (it should match the unsigned builtin argument > type already?) bswap_type is not set for 16-bit bswap since we removed the need to have a builtin bswap in the first place, hence this line. > > Ok with that change. > > Thanks, > Richard. Best regards, Thomas