pr43550 - remove unnecessary uxts in bswap

Jeff Law law@redhat.com
Thu Sep 11 21:04:00 GMT 2014


On 09/04/14 22:04, Kugan wrote:
> Hi All,
>
> For the bswap built-in, there are unnecessary uxts generated as reported
> in pr43550. Can we rely on the argument being unsigned and set the
> SUBREG promoted accordingly.
>
> At least in ARM ABI, arguments are supposed to be properly zero/sign
> extended.
>
> Any thoughts?
>
> Bootstrapped and regression tested on x86_64 and arm.
>
> Thanks,
> Kugan
>
> gcc/testsuite
> 2014-09-05  Kugan Vivekanandarajah  <kuganv@linaro.org>
>
> 	PR target/43550
> 	* gcc.target/arm/pr43550.c: New test.
>
> gcc/
> 2014-09-05  Kugan Vivekanandarajah  <kuganv@linaro.org>
>
> 	PR target/43550
> 	* builtins.c (expand_builtin_bswap): Generate promoted subreg.
I'm not 100% sure you can depend on arguments being extended.  It'll 
often be true, but I don't think it's something you can rely on.

Jeff



More information about the Gcc-patches mailing list