public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/60089] New: Complex arithmetic instructions
@ 2014-02-06  6:46 makhaloff at gmail dot com
  2014-02-06 10:13 ` [Bug middle-end/60089] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: makhaloff at gmail dot com @ 2014-02-06  6:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60089
           Summary: Complex arithmetic instructions
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: makhaloff at gmail dot com

Hello.

I'm porting gcc on some architecture which has complex addition, subtraction
and multiplication instructions.

I was trying to define addchi3, subchi3 but it doesn't work.
I've figured out that complex operations are lowered at the tree-level.

Is there any way to support these instructions?

Thanks.


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

* [Bug middle-end/60089] Complex arithmetic instructions
  2014-02-06  6:46 [Bug rtl-optimization/60089] New: Complex arithmetic instructions makhaloff at gmail dot com
@ 2014-02-06 10:13 ` rguenth at gcc dot gnu.org
  2014-02-06 10:45 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-02-06 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-06
          Component|rtl-optimization            |middle-end
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
You'd need to disable complex lowering at the GIMPLE level and see what
support is missing from RTL expansion for example.

For the disabling I'd suggest adding a target hook (if it at any point is
supposed to go upstream).


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

* [Bug middle-end/60089] Complex arithmetic instructions
  2014-02-06  6:46 [Bug rtl-optimization/60089] New: Complex arithmetic instructions makhaloff at gmail dot com
  2014-02-06 10:13 ` [Bug middle-end/60089] " rguenth at gcc dot gnu.org
@ 2014-02-06 10:45 ` ubizjak at gmail dot com
  2014-02-06 11:03 ` glisse at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ubizjak at gmail dot com @ 2014-02-06 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ubizjak at gmail dot com

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Biener from comment #1)

> For the disabling I'd suggest adding a target hook (if it at any point is
> supposed to go upstream).

This target hook would be handy also for x86_64, which passes packed complex
SFmode values to and from function:

Following test:

_Complex float testf (_Complex float a, _Complex float b)
{
        return a + b;
}

produces (-O2):

testf:
        movq    %xmm0, -8(%rsp)
        movq    %xmm1, -16(%rsp)
        movss   -4(%rsp), %xmm0
        movss   -8(%rsp), %xmm1
        addss   -12(%rsp), %xmm0
        addss   -16(%rsp), %xmm1
        movss   %xmm0, -20(%rsp)
        movss   %xmm1, -24(%rsp)
        movq    -24(%rsp), %xmm0
        ret

Yes, indeed.
>From gcc-bugs-return-442805-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 06 10:46:30 2014
Return-Path: <gcc-bugs-return-442805-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18438 invoked by alias); 6 Feb 2014 10:46:30 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 18389 invoked by uid 48); 6 Feb 2014 10:46:27 -0000
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/60093] ICE on testsuite/c-c++-common/ubsan/overflow-*.c
Date: Thu, 06 Feb 2014 10:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bernd.edlinger at hotmail dot de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cf_gcctarget
Message-ID: <bug-60093-4-SYd1cZlopV@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60093-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60093-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-02/txt/msg00562.txt.bz2
Content-length: 711

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`093

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |armv7l-unknown-linux-gnueab
                   |                            |ihf

--- Comment #1 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Target: armv7l-unknown-linux-gnueabihf
Configured with: ../gcc-4.9-20140202/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


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

* [Bug middle-end/60089] Complex arithmetic instructions
  2014-02-06  6:46 [Bug rtl-optimization/60089] New: Complex arithmetic instructions makhaloff at gmail dot com
  2014-02-06 10:13 ` [Bug middle-end/60089] " rguenth at gcc dot gnu.org
  2014-02-06 10:45 ` ubizjak at gmail dot com
@ 2014-02-06 11:03 ` glisse at gcc dot gnu.org
  2014-02-06 16:56 ` joseph at codesourcery dot com
  2021-11-29  3:06 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-02-06 11:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> You'd need to disable complex lowering at the GIMPLE level and see what
> support is missing from RTL expansion for example.
> 
> For the disabling I'd suggest adding a target hook (if it at any point is
> supposed to go upstream).

Couldn't the complex lowering pass check optab, like vector lowering does?


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

* [Bug middle-end/60089] Complex arithmetic instructions
  2014-02-06  6:46 [Bug rtl-optimization/60089] New: Complex arithmetic instructions makhaloff at gmail dot com
                   ` (2 preceding siblings ...)
  2014-02-06 11:03 ` glisse at gcc dot gnu.org
@ 2014-02-06 16:56 ` joseph at codesourcery dot com
  2021-11-29  3:06 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: joseph at codesourcery dot com @ 2014-02-06 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Is the complex multiplication instruction C99 Annex G-conforming, or could 
it only be used for -fcx-limited-range?


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

* [Bug middle-end/60089] Complex arithmetic instructions
  2014-02-06  6:46 [Bug rtl-optimization/60089] New: Complex arithmetic instructions makhaloff at gmail dot com
                   ` (3 preceding siblings ...)
  2014-02-06 16:56 ` joseph at codesourcery dot com
@ 2021-11-29  3:06 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-29  3:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The way we model these instructions these days is using vector modes.

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

end of thread, other threads:[~2021-11-29  3:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-06  6:46 [Bug rtl-optimization/60089] New: Complex arithmetic instructions makhaloff at gmail dot com
2014-02-06 10:13 ` [Bug middle-end/60089] " rguenth at gcc dot gnu.org
2014-02-06 10:45 ` ubizjak at gmail dot com
2014-02-06 11:03 ` glisse at gcc dot gnu.org
2014-02-06 16:56 ` joseph at codesourcery dot com
2021-11-29  3:06 ` 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).