backport: re PR tree-optimization/53438 (Bitfield store replaced with full-byte store)
2012-05-28 Bill Schmidt <wschmidt@linux.ibm.com> Backport from mainline 2012-05-23 Richard Guenther <rguenther@suse.de> PR tree-optimization/53438 * tree-sra.c (analyze_access_subtree): Correct bitfield exclusion. From-SVN: r187930
This commit is contained in:
parent
57bcbaa69b
commit
b581071734
|
@ -1,3 +1,11 @@
|
|||
2012-05-28 Bill Schmidt <wschmidt@linux.ibm.com>
|
||||
|
||||
Backport from mainline
|
||||
2012-05-28 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/53438
|
||||
* tree-sra.c (analyze_access_subtree): Correct bitfield exclusion.
|
||||
|
||||
2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
Backport from mainline
|
||||
|
|
|
@ -2181,9 +2181,12 @@ analyze_access_subtree (struct access *root, struct access *parent,
|
|||
&& (TREE_CODE (root->type) != INTEGER_TYPE
|
||||
|| TYPE_PRECISION (root->type) != root->size)
|
||||
/* But leave bitfield accesses alone. */
|
||||
&& (root->offset % BITS_PER_UNIT) == 0)
|
||||
&& (TREE_CODE (root->expr) != COMPONENT_REF
|
||||
|| !DECL_BIT_FIELD (TREE_OPERAND (root->expr, 1))))
|
||||
{
|
||||
tree rt = root->type;
|
||||
gcc_assert ((root->offset % BITS_PER_UNIT) == 0
|
||||
&& (root->size % BITS_PER_UNIT) == 0);
|
||||
root->type = build_nonstandard_integer_type (root->size,
|
||||
TYPE_UNSIGNED (rt));
|
||||
root->expr = build_ref_for_offset (UNKNOWN_LOCATION,
|
||||
|
|
Loading…
Reference in New Issue