]> git.ipfire.org Git - thirdparty/gcc.git/commit
lower-bitint: Encode address space qualifiers in VIEW_CONVERT_EXPRs [PR113736]
authorJakub Jelinek <jakub@redhat.com>
Tue, 6 Feb 2024 11:58:55 +0000 (12:58 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 6 Feb 2024 11:58:55 +0000 (12:58 +0100)
commit483c061d699309d58a1b28ce5c00ee9b55a7365c
treefb8314b2d2eb49b1dad5e1b523671e39f3059ad2
parent760a1a5b5e427707357ca1fa858c4561258972df
lower-bitint: Encode address space qualifiers in VIEW_CONVERT_EXPRs [PR113736]

As discussed in the PR, e.g. build_fold_addr_expr needs TYPE_ADDR_SPACE
on the outermost reference rather than just on the base, so the
following patch makes sure to propagate the address space from
the accessed var to the MEM_REFs and/or VIEW_CONVERT_EXPRs used to
access those.

2024-02-06  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/113736
* gimple-lower-bitint.cc (bitint_large_huge::limb_access): Use
var's address space for MEM_REF or VIEW_CONVERT_EXPRs.

* gcc.dg/bitint-86.c: New test.
gcc/gimple-lower-bitint.cc
gcc/testsuite/gcc.dg/bitint-86.c [new file with mode: 0644]