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

--- Comment #4 from Alex Coplan <acoplan at gcc dot gnu.org> ---
I think the problem is that the arm backend incorrectly sets the const
attribute on this builtin, but it can't be const because it reads memory (it
should be pure instead):

 <function_decl 0x7f9943be0900 vld1q_u32
    type <function_type 0x7f9943be1348
        type <vector_type 0x7f9943ef69d8 uint32x4_t type <integer_type
0x7f9943f647e0 long unsigned int>
            sizes-gimplified unsigned V4SI
            size <integer_cst 0x7f9943f60408 constant 128>
            unit-size <integer_cst 0x7f9943f60420 constant 16>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1
structural-equality
            attributes <tree_list 0x7f994406ec30
                purpose <identifier_node 0x7f99440708c0 Advanced SIMD type>
                value <tree_list 0x7f994406ec08
                    value <identifier_node 0x7f9944076050
18__simd128_uint32_t>>> nunits:4>
        HI
        size <integer_cst 0x7f9943f602a0 constant 16>
        unit-size <integer_cst 0x7f9943f602b8 constant 2>
        align:16 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
        arg-types <tree_list 0x7f9943bdfcd0 value <pointer_type 0x7f9943be12a0>
            chain <tree_list 0x7f9943f5d7a8 value <void_type 0x7f9943f6c0a8
void>>>
        pointer_to_this <pointer_type 0x7f9943f799d8>>
    readonly addressable used nothrow public external built-in decl_5 decl_6 SI
t.c:2:9
    align:16 warn_if_not_align:0 built-in: BUILT_IN_MD:3923 context
<translation_unit_decl 0x7f9943ec27f8 t.c>
    attributes <tree_list 0x7f9943bdfeb0
        purpose <identifier_node 0x7f9943f618c0 const tree_0
            rid 0x7f9943f618c0 "const">
        chain <tree_list 0x7f9943bdfe88
            purpose <identifier_node 0x7f9943f73730 nothrow>
            chain <tree_list 0x7f9943bdfe60
                purpose <identifier_node 0x7f9943f73780 leaf>>>> chain
<function_decl 0x7f9943be0a00 __arm_vmaxaq_m>>

Reply via email to