[Bug tree-optimization/83195] [8 regression] pr82929.c scan for "Merging successful" fail

2017-11-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83195

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Jakub Jelinek  ---
Fixed.

[Bug tree-optimization/83195] [8 regression] pr82929.c scan for "Merging successful" fail

2017-11-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83195

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Wed Nov 29 17:38:54 2017
New Revision: 255247

URL: https://gcc.gnu.org/viewcvs?rev=255247=gcc=rev
Log:
PR tree-optimization/83195
* gcc.dg/pr82929.c: Don't check for "Merging successful" on arm.
* gcc.dg/pr82929-2.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr82929-2.c
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/pr82929.c

[Bug tree-optimization/83195] [8 regression] pr82929.c scan for "Merging successful" fail

2017-11-28 Thread sudi.das at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83195

--- Comment #4 from Sudakshina Das  ---
I think this is the only test that fails on arm.

[Bug tree-optimization/83195] [8 regression] pr82929.c scan for "Merging successful" fail

2017-11-28 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83195

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-11-28
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Jakub Jelinek  ---
Created attachment 42737
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42737=edit
gcc8-pr83195.patch

Untested fix.

[Bug tree-optimization/83195] [8 regression] pr82929.c scan for "Merging successful" fail

2017-11-28 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83195

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ktkachov at gcc dot gnu.org

--- Comment #2 from ktkachov at gcc dot gnu.org ---
I agree it's simpler to skip the test on arm, unless we want to go down the
route of testing the movmisalign optab availability, which seems yucky.

[Bug tree-optimization/83195] [8 regression] pr82929.c scan for "Merging successful" fail

2017-11-28 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83195

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
That is because arm is cheating:
proc check_effective_target_non_strict_align {} {

# On ARM, the default is to use STRICT_ALIGNMENT, but there
# are interfaces defined for misaligned access and thus
# depending on the architecture levels unaligned access is
# available.
if [istarget "arm*-*-*"] {
return [check_effective_target_arm_unaligned]
}

return [check_no_compiler_messages non_strict_align assembly {
char *y;
typedef char __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) c;
c *z;
void foo(void) { z = (c *) y; }
} "-Wcast-align"]
}

proc check_effective_target_store_merge { } {
if { [is-effective-target non_strict_align ] && [is-effective-target
int32plus] } {
return 1
}

return 0
}

The testcase really cares about:
  bool allow_unaligned_store
= !STRICT_ALIGNMENT && PARAM_VALUE (PARAM_STORE_MERGING_ALLOW_UNALIGNED);
  bool allow_unaligned_load = allow_unaligned_store;
If that is not true, then in this case the optimization is not beneficial.

Is this the only store merging testcase that fails on arm?
I'd prefer not to add __builtin_assume_aligned and similar to the testcase so
that it tests the !STRICT_ALIGNMENT behavior (perhaps we can have another one
with that builtin), so do I need to uglify by using { target { store_merge && {
! arm*-*-* } } } ?

[Bug tree-optimization/83195] [8 regression] pr82929.c scan for "Merging successful" fail

2017-11-28 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83195

Richard Biener  changed:

   What|Removed |Added

 Target||arm
  Component|regression  |tree-optimization
   Target Milestone|--- |8.0