summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-08 15:23:45 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-08 15:23:45 +0000
commit679e00560fab98466aa1568e5398b948822c9792 (patch)
tree4e76d7f5369ba158c58a7df06202bd2362c5bd34 /gcc/emit-rtl.c
parent1da1826b7789821567dedb4a5418c6d61c915d1c (diff)
downloadgcc-679e00560fab98466aa1568e5398b948822c9792.tar.gz
* emit-rtl.c (set_mem_attributes_minus_bitpos): Fix formatting issues.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161961 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index aebd17d1181..42bb429d5dd 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1611,27 +1611,26 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
/* We can set the alignment from the type if we are making an object,
this is an INDIRECT_REF, or if TYPE_ALIGN_OK. */
- if (objectp || TREE_CODE (t) == INDIRECT_REF
- || TYPE_ALIGN_OK (type))
+ if (objectp || TREE_CODE (t) == INDIRECT_REF || TYPE_ALIGN_OK (type))
align = MAX (align, TYPE_ALIGN (type));
+
else if (TREE_CODE (t) == MEM_REF)
{
+ tree op0 = TREE_OPERAND (t, 0);
unsigned HOST_WIDE_INT aoff = BITS_PER_UNIT;
if (host_integerp (TREE_OPERAND (t, 1), 1))
{
unsigned HOST_WIDE_INT ioff = TREE_INT_CST_LOW (TREE_OPERAND (t, 1));
aoff = (ioff & -ioff) * BITS_PER_UNIT;
}
- if (TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR
- && DECL_P (TREE_OPERAND (TREE_OPERAND (t, 0), 0)))
- align = MAX (align,
- DECL_ALIGN (TREE_OPERAND (TREE_OPERAND (t, 0), 0)));
- else if (TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR
- && CONSTANT_CLASS_P (TREE_OPERAND (TREE_OPERAND (t, 0), 0)))
+ if (TREE_CODE (op0) == ADDR_EXPR && DECL_P (TREE_OPERAND (op0, 0)))
+ align = MAX (align, DECL_ALIGN (TREE_OPERAND (op0, 0)));
+ else if (TREE_CODE (op0) == ADDR_EXPR
+ && CONSTANT_CLASS_P (TREE_OPERAND (op0, 0)))
{
- align = TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (t, 0), 0)));
+ align = TYPE_ALIGN (TREE_TYPE (TREE_OPERAND (op0, 0)));
#ifdef CONSTANT_ALIGNMENT
- align = CONSTANT_ALIGNMENT (TREE_OPERAND (TREE_OPERAND (t, 0), 0), align);
+ align = CONSTANT_ALIGNMENT (TREE_OPERAND (op0, 0), align);
#endif
}
else
@@ -1639,19 +1638,19 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp,
alignment information from types. */
align = MAX (align,
TYPE_ALIGN (TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 1)))));
- if (!integer_zerop (TREE_OPERAND (t, 1))
- && aoff < align)
+
+ if (!integer_zerop (TREE_OPERAND (t, 1)) && aoff < align)
align = aoff;
}
- else
- if (TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
- {
- if (integer_zerop (TREE_OPERAND (t, 1)))
- /* We don't know anything about the alignment. */
- align = BITS_PER_UNIT;
- else
- align = tree_low_cst (TREE_OPERAND (t, 1), 1);
- }
+
+ else if (TREE_CODE (t) == MISALIGNED_INDIRECT_REF)
+ {
+ if (integer_zerop (TREE_OPERAND (t, 1)))
+ /* We don't know anything about the alignment. */
+ align = BITS_PER_UNIT;
+ else
+ align = tree_low_cst (TREE_OPERAND (t, 1), 1);
+ }
/* If the size is known, we can set that. */
if (TYPE_SIZE_UNIT (type) && host_integerp (TYPE_SIZE_UNIT (type), 1))