aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr88621.c25
-rw-r--r--gcc/tree-ssa-loop-im.c5
4 files changed, 39 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 37c318d..1c86e22 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2019-01-02 Richard Biener <rguenther@suse.de>
+ PR tree-optimization/88621
+ * tree-ssa-loop-im.c (gather_mem_refs_stmt): Fix pastos, avoid
+ bitfields when canoncalizing.
+
+2019-01-02 Richard Biener <rguenther@suse.de>
+
PR target/87545
* config/i386/x86-tune-costs.h (intel_cost): Adjust
cost of cheap SSE instruction.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dfb1c97..51ecc53 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-02 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/88621
+ * gcc.dg/torture/pr88621.c: New testcase.
+
2019-01-02 Jakub Jelinek <jakub@redhat.com>
PR ipa/88561
diff --git a/gcc/testsuite/gcc.dg/torture/pr88621.c b/gcc/testsuite/gcc.dg/torture/pr88621.c
new file mode 100644
index 0000000..78492a3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr88621.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+
+struct S
+{
+ int b:4;
+ int c;
+} e = { -1, 0 };
+
+int d, f;
+
+int main ()
+{
+ while (f)
+ {
+ struct S g = { 0, 0 };
+ e = g;
+ }
+L:
+ while (e.b > 0)
+ ;
+ e.b = 0;
+ if (d)
+ goto L;
+ return 0;
+}
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 58da79d..0919931 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -1468,9 +1468,10 @@ gather_mem_refs_stmt (struct loop *loop, gimple *stmt)
tree mem_base;
if (aor.max_size_known_p ()
&& aor.offset.is_constant (&offset)
- && aor.offset.is_constant (&size)
- && aor.offset.is_constant (&max_size)
+ && aor.size.is_constant (&size)
+ && aor.max_size.is_constant (&max_size)
&& size == max_size
+ && (size % BITS_PER_UNIT) == 0
&& (mem_base = get_addr_base_and_unit_offset (aor.ref, &mem_off)))
{
hash = iterative_hash_expr (ao_ref_base (&aor), 0);