-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/12/11 08:36, Jakub Jelinek wrote:
> Hi!
> 
> The read from a 1-bit signed bitfield initialized by a comparison
> is optimized into the comparison, which has that 1-bit signed bitfield
> comparison.  Unfortunately that is still expanded as setting the result
> to 0 resp. 1 instead of this case 0 resp. -1 QImode pseudo, which is then
> sign extended into SImode for the comparison.
> 
> Fixed by special casing expansion in that case.  I think it is rare enough
> we can just ignore the fold_single_bit_test optimization in that case,
> rather than having two versions thereof.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/4.6?
> 
> 2011-05-12  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR middle-end/48973
>       * expr.c (expand_expr_real_2) <case LT_EXPR>: If do_store_flag
>       failed and the comparison has a single bit signed type, use
>       constm1_rtx instead of const1_rtx for true value.
>       (do_store_flag): If ops->type is single bit signed type, disable
>       signel bit test optimization and pass -1 instead of 1 as last
>       parameter to emit_store_flag_force.
> 
>       * gcc.c-torture/execute/pr48973-1.c: New test.
>       * gcc.c-torture/execute/pr48973-2.c: New test.
OK.
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJN2oiJAAoJEBRtltQi2kC7M8sH/2BN1N5CH8ts1+qxjVT2LaRm
HJIeSqO9mC+PCLpP5VW1POCfUi72r5gqXokrYSe+LFRoRriFMwpoKCjR2dcYu1yz
XKkSQo3rb/+FENKITmqn93z6MCRTj97b5oVTG3T8Uf/xIPBc8r0HHqCjOcpud1Eh
YuZNqSVGA8gaxBfWq9HeOyumSbeXp897/+k55uX5L2jhp9ja0Oynf6TCg9gZjEhU
avyRR09o2E+wldaeTxI5H45Y7WDgcSBtYDOLP2SGjrcicf0BwdACmlyWo8KK6ydu
nmS+R6EOO+8WB+W0l8BP9tG82tUVHsQj/Rhy6I1XlByGVHzZdha5BqXW9rnKoLw=
=0wsi
-----END PGP SIGNATURE-----

Reply via email to