diff options
author | zadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-04 23:17:54 +0000 |
---|---|---|
committer | zadeck <zadeck@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-04 23:17:54 +0000 |
commit | f5109c63b126636f82f5d3ffe550bf6813d302f2 (patch) | |
tree | a3da37c593fe5498cc998681f5fb2a44272ca10f /gcc/df-scan.c | |
parent | 486a4fb1cb640cda30503438f224fed3fcd07d93 (diff) | |
download | gcc-f5109c63b126636f82f5d3ffe550bf6813d302f2.tar.gz |
2009-11-04 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df-uses-record): Add case zero_extract of mem.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153924 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df-scan.c')
-rw-r--r-- | gcc/df-scan.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 45df29ecc2b..101234b55bc 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -3248,10 +3248,23 @@ df_uses_record (enum df_ref_class cl, struct df_collection_rec *collection_rec, width = INTVAL (XEXP (dst, 1)); offset = INTVAL (XEXP (dst, 2)); mode = GET_MODE (dst); - df_uses_record (DF_REF_EXTRACT, collection_rec, &XEXP (dst, 0), - DF_REF_REG_USE, bb, insn_info, - DF_REF_READ_WRITE | DF_REF_ZERO_EXTRACT, - width, offset, mode); + if (GET_CODE (XEXP (dst,0)) == MEM) + { + /* Handle the case of zero_extract(mem(...)) in the set dest. + This special case is allowed only if the mem is a single byte and + is useful to set a bitfield in memory. */ + df_uses_record (DF_REF_EXTRACT, collection_rec, &XEXP (XEXP (dst,0), 0), + DF_REF_REG_MEM_STORE, bb, insn_info, + DF_REF_ZERO_EXTRACT, + width, offset, mode); + } + else + { + df_uses_record (DF_REF_EXTRACT, collection_rec, &XEXP (dst, 0), + DF_REF_REG_USE, bb, insn_info, + DF_REF_READ_WRITE | DF_REF_ZERO_EXTRACT, + width, offset, mode); + } } else { |