This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] handling address mode changes inside extract_bit_field
- From: Jim Wilson <jim dot wilson at linaro dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 8 Jun 2017 10:07:44 -0700
- Subject: Re: [PATCH] handling address mode changes inside extract_bit_field
- Authentication-results: sourceware.org; auth=none
- References: <CABXYE2VQo+55AACbN_H-DJXVZwu5TAbTYP94Op8Voh62cZ5_zw@mail.gmail.com> <b9213985-1264-00f7-9510-450e5cfebcc2@redhat.com> <CABXYE2Wg6sBOazoTDpQs7_4yD_9=2z2DTk6wNQq8BCfYjKMDng@mail.gmail.com> <alpine.DEB.2.20.1705151144530.24339@digraph.polyomino.org.uk> <00fd5476-cf07-3bcd-f660-96f7be32192b@redhat.com>
I've got a testcase to add for this patch. Sorry about the delay, I
took some time off to deal with a medical problem.
This was tested with and without the extract_bit_field patch. The
testcase fails without the patch and works with the patch.
Jim
gcc/testsuite/
PR middle-end/79794
* gcc.target/aarch64/pr79794.c: New.
Index: gcc/testsuite/gcc.target/aarch64/pr79794.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/pr79794.c (nonexistent)
+++ gcc/testsuite/gcc.target/aarch64/pr79794.c (working copy)
@@ -0,0 +1,25 @@
+/* PR middle-end/79794 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-final { scan-assembler-not "umov" } } */
+
+struct node_struct
+{
+ float _Complex gap;
+ unsigned long long state;
+};
+
+struct reg_struct
+{
+ int size;
+ struct node_struct *node;
+};
+
+void
+func(int target, struct reg_struct *reg)
+{
+ int i;
+
+ for(i=0; i<reg->size; i++)
+ reg->node[i].state ^= ((unsigned long long) 1 << target);
+}