cselib.c (promote_debug_loc): Allow l->next non-NULL for cselib_preserve_constants.
authorJakub Jelinek <jakub@redhat.com>
Tue, 31 May 2011 19:14:21 +0000 (21:14 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 31 May 2011 19:14:21 +0000 (21:14 +0200)
commit509f4495ee4dedc2a27f9f8f749a0507ef3f1938
tree2f0b491691c28732618def0868a08c868f96b580
parent7351d8da1bdd94d04d276ce75e11897bbc8e3832
cselib.c (promote_debug_loc): Allow l->next non-NULL for cselib_preserve_constants.

* cselib.c (promote_debug_loc): Allow l->next non-NULL for
cselib_preserve_constants.
(cselib_lookup_1): If cselib_preserve_constants,
a new VALUE is being created for REG and there is a VALUE for the
same register in wider mode, add another loc with lowpart SUBREG of
the wider VALUE.
(cselib_subst_to_values): Handle ENTRY_VALUE.
* var-tracking.c  (replace_expr_with_values): Return NULL for
ENTRY_VALUE too.
* dwarf2out.c (convert_descriptor_to_signed): New function.
(mem_loc_descriptor) <case ZERO_EXTEND>: Optimize using DW_OP_and
instead of two shifts.
(mem_loc_descriptor) <do_shift>: ZERO_EXTEND second argument to
the right mode if needed.
(mem_loc_descriptor) <case MOD>: For typed ops just use DW_OP_mod.
(mem_loc_descriptor) <case UNSIGNED_FIX>: Use
convert_descriptor_to_signed.
(mem_loc_descriptor) <case UDIV, CLZ, CTZ, FFS, POPCOUNT, PARITY,
BSWAP, ROTATE, ROTATERT>: Handle these rtls.

* gcc.dg/guality/bswaptest.c: New test.
* gcc.dg/guality/clztest.c: New test.
* gcc.dg/guality/ctztest.c: New test.
* gcc.dg/guality/rotatetest.c: New test.

From-SVN: r174508
gcc/ChangeLog
gcc/cselib.c
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/bswaptest.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/guality/clztest.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/guality/ctztest.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/guality/rotatetest.c [new file with mode: 0644]
gcc/var-tracking.c