public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/102162] Byte-wise access optimized away at -O1 and above
Date: Wed, 01 Sep 2021 23:45:07 +0000	[thread overview]
Message-ID: <bug-102162-4-8uvgjxkAig@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102162-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102162

--- Comment #19 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Gimple level does look correct:
 <component_ref 0x7ffff7359300
    type <integer_type 0x7ffff7315b28 u32 readonly unsigned SI
        size <integer_cst 0x7ffff7244b40 constant 32>
        unit-size <integer_cst 0x7ffff7244b58 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff7315bd0 precision:32 min <integer_cst 0x7ffff7244b70 0> max <integer_cst
0x7ffff7244b28 4294967295> context <translation_unit_decl 0x7ffff733e870 t.c>>
    readonly
    arg:0 <mem_ref 0x7ffff735b2f8
        type <record_type 0x7ffff73159d8 readonly no-force-blk packed type_0
BLK size <integer_cst 0x7ffff7244b40 32> unit-size <integer_cst 0x7ffff7244b58
4>
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff73159d8
            attributes <tree_list 0x7ffff732bd20
                purpose <identifier_node 0x7ffff7344690 packed>> fields
<field_decl 0x7ffff725ebe0 x> context <block 0x7ffff7338420>
            pointer_to_this <pointer_type 0x7ffff7315a80>>

        arg:0 <addr_expr 0x7ffff73326e0 type <pointer_type 0x7ffff7315888>
            constant arg:0 <var_decl 0x7ffff7ff6120 output_len>
            t.c:17:9 start: t.c:17:9 finish: t.c:17:39>
        arg:1 <integer_cst 0x7ffff733bf00 constant 0>>
    arg:1 <field_decl 0x7ffff725ebe0 x
        type <integer_type 0x7ffff7315738 u32 unsigned SI size <integer_cst
0x7ffff7244b40 32> unit-size <integer_cst 0x7ffff7244b58 4>
            align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff7251690 precision:32 min <integer_cst 0x7ffff7244b70 0> max <integer_cst
0x7ffff7244b28 4294967295> context <translation_unit_decl 0x7ffff733e870 t.c>
            pointer_to_this <pointer_type 0x7ffff7315888>>
        unsigned packed SI t.c:12:33 size <integer_cst 0x7ffff7244b40 32>
unit-size <integer_cst 0x7ffff7244b58 4>
        align:8 warn_if_not_align:0 offset_align 128
        offset <integer_cst 0x7ffff7244930 constant 0>
        bit-offset <integer_cst 0x7ffff7244948 constant 0> context <record_type
0x7ffff7315930>>
    t.c:12:103 start: t.c:12:97 finish: t.c:12:105>

The var_decl too:
(gdb) p debug_tree(0x7ffff7ff6120)
 <var_decl 0x7ffff7ff6120 output_len
    type <integer_type 0x7ffff7315738 u32 unsigned SI
        size <integer_cst 0x7ffff7244b40 constant 32>
        unit-size <integer_cst 0x7ffff7244b58 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff7251690 precision:32 min <integer_cst 0x7ffff7244b70 0> max <integer_cst
0x7ffff7244b28 4294967295> context <translation_unit_decl 0x7ffff733e870 t.c>
        pointer_to_this <pointer_type 0x7ffff7315888>>
    addressable used public unsigned external read SI t.c:6:14 size
<integer_cst 0x7ffff7244b40 32> unit-size <integer_cst 0x7ffff7244b58 4>
    user align:8 warn_if_not_align:0 context <translation_unit_decl
0x7ffff733e870 t.c>
    attributes <tree_list 0x7ffff732bc30
        purpose <identifier_node 0x7ffff7344500 aligned>
        value <tree_list 0x7ffff732bbb8
            value <integer_cst 0x7ffff7244cf0 constant 1>>> chain
<function_decl 0x7ffff7336a00 test>>

  parent reply	other threads:[~2021-09-01 23:45 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 16:52 [Bug tree-optimization/102162] New: " danglin at gcc dot gnu.org
2021-09-01 18:52 ` [Bug tree-optimization/102162] " danglin at gcc dot gnu.org
2021-09-01 20:14 ` arnd at linaro dot org
2021-09-01 20:52 ` deller at gmx dot de
2021-09-01 20:56 ` dave.anglin at bell dot net
2021-09-01 21:08 ` dave.anglin at bell dot net
2021-09-01 21:15 ` deller at gmx dot de
2021-09-01 21:19 ` dave.anglin at bell dot net
2021-09-01 21:25 ` deller at gmx dot de
2021-09-01 21:29 ` deller at gmx dot de
2021-09-01 21:48 ` pinskia at gcc dot gnu.org
2021-09-01 21:51 ` [Bug middle-end/102162] " pinskia at gcc dot gnu.org
2021-09-01 21:52 ` pinskia at gcc dot gnu.org
2021-09-01 22:35 ` dave.anglin at bell dot net
2021-09-01 22:46 ` dave.anglin at bell dot net
2021-09-01 22:56 ` pinskia at gcc dot gnu.org
2021-09-01 23:19 ` pinskia at gcc dot gnu.org
2021-09-01 23:21 ` pinskia at gcc dot gnu.org
2021-09-01 23:29 ` pinskia at gcc dot gnu.org
2021-09-01 23:45 ` pinskia at gcc dot gnu.org [this message]
2021-09-01 23:55 ` pinskia at gcc dot gnu.org
2021-09-02  0:02 ` dave.anglin at bell dot net
2021-09-02  0:19 ` pinskia at gcc dot gnu.org
2021-09-02  0:23 ` pinskia at gcc dot gnu.org
2021-09-02  0:47 ` dave.anglin at bell dot net
2021-09-02  0:49 ` pinskia at gcc dot gnu.org
2021-09-02  3:33 ` pinskia at gcc dot gnu.org
2021-09-02  7:12 ` rguenth at gcc dot gnu.org
2021-09-02  9:01 ` arnd at linaro dot org
2021-09-02  9:41 ` deller at gmx dot de
2021-09-02  9:52 ` pinskia at gcc dot gnu.org
2021-09-02 13:59 ` deller at gmx dot de
2021-09-02 14:00 ` deller at gmx dot de
2021-09-03 23:25 ` deller at gmx dot de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-102162-4-8uvgjxkAig@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).