public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] [PR100518] store by mult pieces: keep addr in Pmode
@ 2021-12-09  5:05 Alexandre Oliva
  0 siblings, 0 replies; only message in thread
From: Alexandre Oliva @ 2021-12-09  5:05 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:dc4388b6e21b37c2f0aa94f71554fc57a6c2b38c

commit dc4388b6e21b37c2f0aa94f71554fc57a6c2b38c
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Dec 9 02:03:15 2021 -0300

    [PR100518] store by mult pieces: keep addr in Pmode

Diff:
---
 gcc/builtins.c                              | 2 +-
 gcc/testsuite/gcc.target/aarch64/pr100518.c | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gcc/builtins.c b/gcc/builtins.c
index 304d87dafb7..cd8947b4de2 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -4003,7 +4003,7 @@ try_store_by_multiple_pieces (rtx to, rtx len, unsigned int ctz_len,
       constfundata = &valc;
     }
 
-  rtx ptr = copy_addr_to_reg (convert_to_mode (ptr_mode, XEXP (to, 0), 0));
+  rtx ptr = copy_addr_to_reg (XEXP (to, 0));
   rtx rem = copy_to_mode_reg (ptr_mode, convert_to_mode (ptr_mode, len, 0));
   to = replace_equiv_address (to, ptr);
   set_mem_align (to, align);
diff --git a/gcc/testsuite/gcc.target/aarch64/pr100518.c b/gcc/testsuite/gcc.target/aarch64/pr100518.c
new file mode 100644
index 00000000000..5ca599f5d2e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr100518.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mabi=ilp32 -mstrict-align -O2" } */
+
+int unsigned_range_min, unsigned_range_max, a11___trans_tmp_1;
+
+void a11() {
+  a11___trans_tmp_1 = unsigned_range_max < unsigned_range_min;
+  __builtin_memset((char *)1, 0, a11___trans_tmp_1);
+}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-09  5:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09  5:05 [gcc(refs/users/aoliva/heads/testme)] [PR100518] store by mult pieces: keep addr in Pmode Alexandre Oliva

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).