public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/60236] New: gfortran.dg/vect/pr32380.f fails on ARM
@ 2014-02-17  9:39 bernd.edlinger at hotmail dot de
  2014-02-17 12:40 ` [Bug tree-optimization/60236] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-02-17  9:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60236

            Bug ID: 60236
           Summary: gfortran.dg/vect/pr32380.f fails on ARM
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bernd.edlinger at hotmail dot de

Hi,

this test case fails, because the only 5 of 6 loops get optimized:

pr32380.f:162:0: note: function is not vectorizable.                            
pr32380.f:162:0: note: not vectorized: relevant stmt not supported: _113 =
__builtin_sqrtf (_112);

pr32380.f:5:0: note: vectorized 5 loops in function.

but the test case expects 6 loops here.


gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/ed/gnu/arm-linux-gnueabihf/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.9.0/lto-wrapper
Target: armv7l-unknown-linux-gnueabihf
Configured with: ../gcc-4.9-20140209/configure
--prefix=/home/ed/gnu/arm-linux-gnueabihf
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go --with-arch=armv7-a
--with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard
Thread model: posix
gcc version 4.9.0 20140209 (experimental) (GCC)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/60236] gfortran.dg/vect/pr32380.f fails on ARM
  2014-02-17  9:39 [Bug tree-optimization/60236] New: gfortran.dg/vect/pr32380.f fails on ARM bernd.edlinger at hotmail dot de
@ 2014-02-17 12:40 ` rguenth at gcc dot gnu.org
  2014-02-17 13:12 ` bernd.edlinger at hotmail dot de
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-02-17 12:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60236

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Does ARM have a builtin-vectorized-function hook that handles sqrtf?  If not,
then that's expected.

Please adjust the expected number of vectorizations with vect_call_sqrt like

! { dg-final { scan-tree-dump-times "vectorized 5 loops" 1 "vect" { ! target
vect_call_sqrt } } }
! { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { target
vect_call_sqrt  } } }

(and hope that powerpc and ia64 hit exactly the same issue ...)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/60236] gfortran.dg/vect/pr32380.f fails on ARM
  2014-02-17  9:39 [Bug tree-optimization/60236] New: gfortran.dg/vect/pr32380.f fails on ARM bernd.edlinger at hotmail dot de
  2014-02-17 12:40 ` [Bug tree-optimization/60236] " rguenth at gcc dot gnu.org
@ 2014-02-17 13:12 ` bernd.edlinger at hotmail dot de
  2014-02-17 13:54 ` bernd.edlinger at hotmail dot de
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-02-17 13:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60236

--- Comment #2 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Richard Biener from comment #1)
> Does ARM have a builtin-vectorized-function hook that handles sqrtf?  If not,
> then that's expected.
> 

Yes, it does have a builtin-vectorized-function which does _not_ handle sqrtf.

> Please adjust the expected number of vectorizations with vect_call_sqrt like
> 
> ! { dg-final { scan-tree-dump-times "vectorized 5 loops" 1 "vect" { ! target
> vect_call_sqrt } } }
> ! { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { target
> vect_call_sqrt  } } }
> 
> (and hope that powerpc and ia64 hit exactly the same issue ...)

you mean vect_call_sqrtf ?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/60236] gfortran.dg/vect/pr32380.f fails on ARM
  2014-02-17  9:39 [Bug tree-optimization/60236] New: gfortran.dg/vect/pr32380.f fails on ARM bernd.edlinger at hotmail dot de
  2014-02-17 12:40 ` [Bug tree-optimization/60236] " rguenth at gcc dot gnu.org
  2014-02-17 13:12 ` bernd.edlinger at hotmail dot de
@ 2014-02-17 13:54 ` bernd.edlinger at hotmail dot de
  2014-02-17 20:26 ` bernd.edlinger at hotmail dot de
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-02-17 13:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60236

--- Comment #3 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
ERROR: gfortran.dg/vect/pr32380.f  -O : error executing dg-final: syntax error
in target selector "! target vect_call_sqrtf"

what is the right syntax here??


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/60236] gfortran.dg/vect/pr32380.f fails on ARM
  2014-02-17  9:39 [Bug tree-optimization/60236] New: gfortran.dg/vect/pr32380.f fails on ARM bernd.edlinger at hotmail dot de
                   ` (2 preceding siblings ...)
  2014-02-17 13:54 ` bernd.edlinger at hotmail dot de
@ 2014-02-17 20:26 ` bernd.edlinger at hotmail dot de
  2014-02-19  7:21 ` bernd.edlinger at hotmail dot de
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-02-17 20:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60236

--- Comment #4 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
hmm...

I just looked at PR#52229.
At least on PowerPC many more loops are not vectorizable.
because of unaligned access.

Jakub's last comment there is that the xfail
should be based on the vect_hw_misaling attribute.

Well, but the problem on ARMv7 was not about misalignment
instead it was about we can not vectorize the SQRT on Arm,
and certainly not on IA64, because they have no
builtin-vectorized-function hook at all:

       set et_vect_hw_misalign_saved 0
       if { ([istarget x86_64-*-*]
            || [istarget aarch64*-*-*]
            || [istarget i?86-*-*]) } {
          set et_vect_hw_misalign_saved 1
       }

is this correct for ARM?
Or can the ARM CPU vectorize unaligned data,
I think they just have to know if the data is aligned or not,
and choose different opcodes?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/60236] gfortran.dg/vect/pr32380.f fails on ARM
  2014-02-17  9:39 [Bug tree-optimization/60236] New: gfortran.dg/vect/pr32380.f fails on ARM bernd.edlinger at hotmail dot de
                   ` (3 preceding siblings ...)
  2014-02-17 20:26 ` bernd.edlinger at hotmail dot de
@ 2014-02-19  7:21 ` bernd.edlinger at hotmail dot de
  2014-02-19  7:26 ` bernd.edlinger at hotmail dot de
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-02-19  7:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60236

--- Comment #5 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Created attachment 32166
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32166&action=edit
proposed patch

Ok, now I have fixed the syntax.

This patch works for arm and x86_64.
And takes into account the Problem that was reported
for PowerPC at PR52229.

But I cannot run the test on PowerPC.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/60236] gfortran.dg/vect/pr32380.f fails on ARM
  2014-02-17  9:39 [Bug tree-optimization/60236] New: gfortran.dg/vect/pr32380.f fails on ARM bernd.edlinger at hotmail dot de
                   ` (4 preceding siblings ...)
  2014-02-19  7:21 ` bernd.edlinger at hotmail dot de
@ 2014-02-19  7:26 ` bernd.edlinger at hotmail dot de
  2014-03-02 18:07 ` [Bug fortran/60236] " edlinger at gcc dot gnu.org
  2021-09-02  9:11 ` pinskia at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-02-19  7:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60236

Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dominiq at lps dot ens.fr,
                   |                            |tkoenig at gcc dot gnu.org

--- Comment #6 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Hi,

This patch tries to solve the problem in a more general way.
I wonder if one of you could try this patch on PowerPC?

Thanks
Bernd.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/60236] gfortran.dg/vect/pr32380.f fails on ARM
  2014-02-17  9:39 [Bug tree-optimization/60236] New: gfortran.dg/vect/pr32380.f fails on ARM bernd.edlinger at hotmail dot de
                   ` (5 preceding siblings ...)
  2014-02-19  7:26 ` bernd.edlinger at hotmail dot de
@ 2014-03-02 18:07 ` edlinger at gcc dot gnu.org
  2021-09-02  9:11 ` pinskia at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: edlinger at gcc dot gnu.org @ 2014-03-02 18:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60236

--- Comment #8 from edlinger at gcc dot gnu.org ---
Author: edlinger
Date: Sun Mar  2 18:06:49 2014
New Revision: 208257

URL: http://gcc.gnu.org/viewcvs?rev=208257&root=gcc&view=rev
Log:
2014-03-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR fortran/60236
        * gfortran.dg/vect/pr32380.f: Fix expected test results.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/vect/pr32380.f


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/60236] gfortran.dg/vect/pr32380.f fails on ARM
  2014-02-17  9:39 [Bug tree-optimization/60236] New: gfortran.dg/vect/pr32380.f fails on ARM bernd.edlinger at hotmail dot de
                   ` (6 preceding siblings ...)
  2014-03-02 18:07 ` [Bug fortran/60236] " edlinger at gcc dot gnu.org
@ 2021-09-02  9:11 ` pinskia at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-02  9:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60236

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Greta.Yorsh at arm dot com

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 52249 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-02  9:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17  9:39 [Bug tree-optimization/60236] New: gfortran.dg/vect/pr32380.f fails on ARM bernd.edlinger at hotmail dot de
2014-02-17 12:40 ` [Bug tree-optimization/60236] " rguenth at gcc dot gnu.org
2014-02-17 13:12 ` bernd.edlinger at hotmail dot de
2014-02-17 13:54 ` bernd.edlinger at hotmail dot de
2014-02-17 20:26 ` bernd.edlinger at hotmail dot de
2014-02-19  7:21 ` bernd.edlinger at hotmail dot de
2014-02-19  7:26 ` bernd.edlinger at hotmail dot de
2014-03-02 18:07 ` [Bug fortran/60236] " edlinger at gcc dot gnu.org
2021-09-02  9:11 ` pinskia at gcc dot gnu.org

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