public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54427] New: Expose more vector extensions
@ 2012-08-30 20:07 glisse at gcc dot gnu.org
  2012-09-03 10:38 ` [Bug c++/54427] " rguenth at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-08-30 20:07 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54427
           Summary: Expose more vector extensions
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: glisse@gcc.gnu.org


Hello,

for gcc's vector extension to be really useful, we need a way to access a large
enough subset of operations on vectors in a target-independent way. C exposes
comparisons (< <= > >= == !=) and shifts (<< >>), but C++ doesn't. Either these
operators should be implemented in the C++ front-end as well, or some builtins
should be provided with the same role (__builtin_vec_less?).


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
@ 2012-09-03 10:38 ` rguenth at gcc dot gnu.org
  2012-09-14 17:17 ` glisse at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-03 10:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-09-03
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-03 10:37:58 UTC ---
Confirmed.


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
  2012-09-03 10:38 ` [Bug c++/54427] " rguenth at gcc dot gnu.org
@ 2012-09-14 17:17 ` glisse at gcc dot gnu.org
  2012-09-14 17:22 ` glisse at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-09-14 17:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> 2012-09-14 17:17:08 UTC ---
Author: glisse
Date: Fri Sep 14 17:17:01 2012
New Revision: 191308

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191308
Log:
2012-09-14  Marc Glisse  <marc.glisse@inria.fr>
    PR c++/54427

gcc/ChangeLog
    * fold-const.c (fold_unary_loc): Disable for VECTOR_TYPE.
    (fold_binary_loc): Likewise.
    * gimple-fold.c (and_comparisons_1): Handle VECTOR_TYPE.
    (or_comparisons_1): Likewise.

gcc/cp/ChangeLog
    * typeck.c (cp_build_binary_op) [LSHIFT_EXPR, RSHIFT_EXPR, EQ_EXPR,
    NE_EXPR, LE_EXPR, GE_EXPR, LT_EXPR, GT_EXPR]: Handle VECTOR_TYPE.

gcc/testsuite/ChangeLog
    * g++.dg/other/vector-compare.C: New testcase.
    * gcc/testsuite/c-c++-common/vector-compare-3.c: New testcase.
    * gcc.dg/vector-shift.c: Move ...
    * c-c++-common/vector-shift.c: ... here.
    * gcc.dg/vector-shift1.c: Move ...
    * c-c++-common/vector-shift1.c: ... here.
    * gcc.dg/vector-shift3.c: Move ...
    * c-c++-common/vector-shift3.c: ... here.
    * gcc.dg/vector-compare-1.c: Move ...
    * c-c++-common/vector-compare-1.c: ... here.
    * gcc.dg/vector-compare-2.c: Move ...
    * c-c++-common/vector-compare-2.c: ... here.
    * gcc.c-torture/execute/vector-compare-1.c: Move ...
    * c-c++-common/torture/vector-compare-1.c: ... here.
    * gcc.c-torture/execute/vector-compare-2.x: Delete.
    * gcc.c-torture/execute/vector-compare-2.c: Move ...
    * c-c++-common/torture/vector-compare-2.c: ... here.
    * gcc.c-torture/execute/vector-shift.c: Move ...
    * c-c++-common/torture/vector-shift.c: ... here.
    * gcc.c-torture/execute/vector-shift2.c: Move ...
    * c-c++-common/torture/vector-shift2.c: ... here.
    * gcc.c-torture/execute/vector-subscript-1.c: Move ...
    * c-c++-common/torture/vector-subscript-1.c: ... here.
    * gcc.c-torture/execute/vector-subscript-2.c: Move ...
    * c-c++-common/torture/vector-subscript-2.c: ... here.
    * gcc.c-torture/execute/vector-subscript-3.c: Move ...
    * c-c++-common/torture/vector-subscript-3.c: ... here.


Added:
    trunk/gcc/testsuite/c-c++-common/torture/vector-compare-1.c
      - copied, changed from r190838,
trunk/gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c
    trunk/gcc/testsuite/c-c++-common/torture/vector-compare-2.c
      - copied, changed from r190838,
trunk/gcc/testsuite/gcc.c-torture/execute/vector-compare-2.c
    trunk/gcc/testsuite/c-c++-common/torture/vector-shift.c
      - copied, changed from r190838,
trunk/gcc/testsuite/gcc.c-torture/execute/vector-shift.c
    trunk/gcc/testsuite/c-c++-common/torture/vector-shift2.c
      - copied, changed from r190838,
trunk/gcc/testsuite/gcc.c-torture/execute/vector-shift2.c
    trunk/gcc/testsuite/c-c++-common/torture/vector-subscript-1.c
      - copied, changed from r190838,
trunk/gcc/testsuite/gcc.c-torture/execute/vector-subscript-1.c
    trunk/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c
      - copied, changed from r190838,
trunk/gcc/testsuite/gcc.c-torture/execute/vector-subscript-2.c
    trunk/gcc/testsuite/c-c++-common/torture/vector-subscript-3.c
      - copied, changed from r190838,
trunk/gcc/testsuite/gcc.c-torture/execute/vector-subscript-3.c
    trunk/gcc/testsuite/c-c++-common/vector-compare-1.c
      - copied, changed from r190834,
trunk/gcc/testsuite/gcc.dg/vector-compare-1.c
    trunk/gcc/testsuite/c-c++-common/vector-compare-2.c
      - copied unchanged from r190834,
trunk/gcc/testsuite/gcc.dg/vector-compare-2.c
    trunk/gcc/testsuite/c-c++-common/vector-compare-3.c   (with props)
    trunk/gcc/testsuite/c-c++-common/vector-shift.c
      - copied, changed from r190834, trunk/gcc/testsuite/gcc.dg/vector-shift.c
    trunk/gcc/testsuite/c-c++-common/vector-shift1.c
      - copied, changed from r190834,
trunk/gcc/testsuite/gcc.dg/vector-shift1.c
    trunk/gcc/testsuite/c-c++-common/vector-shift3.c
      - copied, changed from r190834,
trunk/gcc/testsuite/gcc.dg/vector-shift3.c
    trunk/gcc/testsuite/g++.dg/other/vector-compare.C   (with props)
Removed:
    trunk/gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c
    trunk/gcc/testsuite/gcc.c-torture/execute/vector-compare-2.c
    trunk/gcc/testsuite/gcc.c-torture/execute/vector-compare-2.x
    trunk/gcc/testsuite/gcc.c-torture/execute/vector-shift.c
    trunk/gcc/testsuite/gcc.c-torture/execute/vector-shift2.c
    trunk/gcc/testsuite/gcc.c-torture/execute/vector-subscript-1.c
    trunk/gcc/testsuite/gcc.c-torture/execute/vector-subscript-2.c
    trunk/gcc/testsuite/gcc.c-torture/execute/vector-subscript-3.c
    trunk/gcc/testsuite/gcc.dg/vector-compare-1.c
    trunk/gcc/testsuite/gcc.dg/vector-compare-2.c
    trunk/gcc/testsuite/gcc.dg/vector-shift.c
    trunk/gcc/testsuite/gcc.dg/vector-shift1.c
    trunk/gcc/testsuite/gcc.dg/vector-shift3.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/fold-const.c
    trunk/gcc/gimple-fold.c
    trunk/gcc/testsuite/ChangeLog

Propchange: trunk/gcc/testsuite/c-c++-common/vector-compare-3.c
            ('svn:eol-style' added)

Propchange: trunk/gcc/testsuite/c-c++-common/vector-compare-3.c
            ('svn:keywords' added)

Propchange: trunk/gcc/testsuite/g++.dg/other/vector-compare.C
            ('svn:eol-style' added)

Propchange: trunk/gcc/testsuite/g++.dg/other/vector-compare.C
            ('svn:keywords' added)


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
  2012-09-03 10:38 ` [Bug c++/54427] " rguenth at gcc dot gnu.org
  2012-09-14 17:17 ` glisse at gcc dot gnu.org
@ 2012-09-14 17:22 ` glisse at gcc dot gnu.org
  2012-09-20 19:01 ` pthaugen at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-09-14 17:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> 2012-09-14 17:22:24 UTC ---
Progress :-)

Documentation update is needed.

Next useful one would be ?: so we can generate vec_cond_expr. See the OpenCL
specification for a list of what's missing.

Another useful thing would be to audit the optimization passes that don't
expect vectors and mishandle them...


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-09-14 17:22 ` glisse at gcc dot gnu.org
@ 2012-09-20 19:01 ` pthaugen at gcc dot gnu.org
  2012-09-20 19:13 ` pthaugen at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pthaugen at gcc dot gnu.org @ 2012-09-20 19:01 UTC (permalink / raw)
  To: gcc-bugs


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

Pat Haugen <pthaugen at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pthaugen at gcc dot gnu.org

--- Comment #4 from Pat Haugen <pthaugen at gcc dot gnu.org> 2012-09-20 19:00:47 UTC ---
(In reply to comment #2)
>     * gcc.c-torture/execute/vector-compare-2.c: Move ...
>     * c-c++-common/torture/vector-compare-2.c: ... here.

This test is now failing on powerpc64-unknown-linux-gnu due to warning messages
being emitted for 32-bit.

FAIL: c-c++-common/torture/vector-compare-2.c  -O0  (test for excess errors)
FAIL: c-c++-common/torture/vector-compare-2.c  -O1  (test for excess errors)
...

This is due to the fact that in the old location the compile command included
-w which suppressed warnings, whereas the new location does not. The test can
be fixed for powerpc by adding the following line (as is present in
c-c++-common/vector-compare-2.c).

/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } }
*/

But it looks like this same test started failing on i686-pc-linux-gnu
(http://gcc.gnu.org/ml/gcc-testresults/2012-09/msg01842.html), guessing for the
same reason. Not sure if there's some similar type option that can be added for
that target or whether '-w' should just be added to the testcase.


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-09-20 19:01 ` pthaugen at gcc dot gnu.org
@ 2012-09-20 19:13 ` pthaugen at gcc dot gnu.org
  2012-09-20 19:47 ` glisse at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pthaugen at gcc dot gnu.org @ 2012-09-20 19:13 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Pat Haugen <pthaugen at gcc dot gnu.org> 2012-09-20 19:13:25 UTC ---
Forgot to include the error message, which is causing the failures:

/home/pthaugen/src/gcc/trunk/gcc/gcc/testsuite/c-c++-common/torture/vector-compare-2.c:9:1:
warning: GCC vector passed by reference: non-standard ABI extension with no
compatibility guarantee [enabled by default]


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-09-20 19:13 ` pthaugen at gcc dot gnu.org
@ 2012-09-20 19:47 ` glisse at gcc dot gnu.org
  2012-09-21  9:20 ` glisse at gcc dot gnu.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-09-20 19:47 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> 2012-09-20 19:46:57 UTC ---
(In reply to comment #4)
> This test is now failing on powerpc64-unknown-linux-gnu due to warning messages
> being emitted for 32-bit.

I was kind of expecting that (mentioned in the patch submission) but couldn't
see what I was changing by moving the test.

> This is due to the fact that in the old location the compile command included
> -w which suppressed warnings, whereas the new location does not.

Ah, thanks a lot! I didn't realize there was an automatic -w in the old
location.

> The test can
> be fixed for powerpc by adding the following line (as is present in
> c-c++-common/vector-compare-2.c).
> 
> /* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } }
> */
> 
> But it looks like this same test started failing on i686-pc-linux-gnu
> (http://gcc.gnu.org/ml/gcc-testresults/2012-09/msg01842.html), guessing for the
> same reason. Not sure if there's some similar type option that can be added for
> that target or whether '-w' should just be added to the testcase.

Yes, I think adding -w is the easiest solution (after all that's just reverting
to the old behavior). Otherwise the test could be changed to pass arguments by
pointer like the others, but I didn't dare do that in case it was specifically
testing passing by value.

I'll submit the -w ASAP, thanks again.


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-09-20 19:47 ` glisse at gcc dot gnu.org
@ 2012-09-21  9:20 ` glisse at gcc dot gnu.org
  2012-09-27 10:06 ` glisse at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-09-21  9:20 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> 2012-09-21 09:19:47 UTC ---
Author: glisse
Date: Fri Sep 21 09:19:39 2012
New Revision: 191604

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191604
Log:
2012-09-21  Marc Glisse  <marc.glisse@inria.fr>

    PR c++/54427
    * c-c++-common/torture/vector-compare-2.c: Add -w.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/c-c++-common/torture/vector-compare-2.c


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-09-21  9:20 ` glisse at gcc dot gnu.org
@ 2012-09-27 10:06 ` glisse at gcc dot gnu.org
  2012-10-09  6:18 ` glisse at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-09-27 10:06 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Marc Glisse <glisse at gcc dot gnu.org> 2012-09-27 10:06:29 UTC ---
Author: glisse
Date: Thu Sep 27 10:06:23 2012
New Revision: 191800

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191800
Log:
2012-09-27  Marc Glisse  <marc.glisse@inria.fr>

    PR c/53024
    PR c++/54427
    * gcc/doc/extend.texi (Vector Extensions): C++ improvements.
    Power of 2 size requirement.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/extend.texi


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2012-09-27 10:06 ` glisse at gcc dot gnu.org
@ 2012-10-09  6:18 ` glisse at gcc dot gnu.org
  2012-10-25 13:03 ` glisse at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-10-09  6:18 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Marc Glisse <glisse at gcc dot gnu.org> 2012-10-09 06:18:35 UTC ---
Author: glisse
Date: Tue Oct  9 06:18:29 2012
New Revision: 192238

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192238
Log:
2012-10-09  Marc Glisse  <marc.glisse@inria.fr>

    PR c++/54427

c/
    * c-typeck.c: Include c-common.h.
    (enum stv_conv): Moved to c-common.h.
    (scalar_to_vector): Moved to c-common.c.
    (build_binary_op): Adapt to scalar_to_vector's new prototype.
    * Make-lang.in: c-typeck.c depends on c-common.h.

c-family/
    * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
    more operations. Make error messages optional.
    * c-common.h (enum stv_conv): Moved from c-typeck.c.
    (scalar_to_vector): Declare.

cp/
    * typeck.c (cp_build_binary_op): Handle mixed scalar-vector
    operations.
    [LSHIFT_EXPR, RSHIFT_EXPR]: Likewise.

gcc/
    * fold-const.c (fold_binary_loc): Use build_zero_cst instead of
    build_int_cst for a potential vector.

testsuite/
    * c-c++-common/vector-scalar.c: New testcase.
    * g++.dg/ext/vector18.C: New testcase.
    * g++.dg/ext/vector5.C: This is not an error anymore.
    * gcc.dg/init-vec-1.c: Move ...
    * c-c++-common/init-vec-1.c: ... here. Adapt error message.
    * gcc.c-torture/execute/vector-shift1.c: Move ...
    * c-c++-common/torture/vector-shift1.c: ... here.
    * gcc.dg/scal-to-vec1.c: Move ...
    * c-c++-common/scal-to-vec1.c: ... here. Avoid narrowing for
    C++11. Adapt error messages.
    * gcc.dg/convert-vec-1.c: Move ...
    * c-c++-common/convert-vec-1.c: ... here.
    * gcc.dg/scal-to-vec2.c: Move ...
    * c-c++-common/scal-to-vec2.c: ... here.


Added:
    trunk/gcc/testsuite/c-c++-common/convert-vec-1.c
      - copied unchanged from r191610,
trunk/gcc/testsuite/gcc.dg/convert-vec-1.c
    trunk/gcc/testsuite/c-c++-common/init-vec-1.c
      - copied, changed from r191610, trunk/gcc/testsuite/gcc.dg/init-vec-1.c
    trunk/gcc/testsuite/c-c++-common/scal-to-vec1.c
      - copied, changed from r191610, trunk/gcc/testsuite/gcc.dg/scal-to-vec1.c
    trunk/gcc/testsuite/c-c++-common/scal-to-vec2.c
      - copied unchanged from r191610,
trunk/gcc/testsuite/gcc.dg/scal-to-vec2.c
    trunk/gcc/testsuite/c-c++-common/torture/vector-shift1.c
      - copied, changed from r191610,
trunk/gcc/testsuite/gcc.c-torture/execute/vector-shift1.c
    trunk/gcc/testsuite/c-c++-common/vector-scalar.c   (with props)
    trunk/gcc/testsuite/g++.dg/ext/vector18.C   (with props)
Removed:
    trunk/gcc/testsuite/gcc.c-torture/execute/vector-shift1.c
    trunk/gcc/testsuite/gcc.dg/convert-vec-1.c
    trunk/gcc/testsuite/gcc.dg/init-vec-1.c
    trunk/gcc/testsuite/gcc.dg/scal-to-vec1.c
    trunk/gcc/testsuite/gcc.dg/scal-to-vec2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/c-family/c-common.h
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/Make-lang.in
    trunk/gcc/c/c-typeck.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/ext/vector5.C

Propchange: trunk/gcc/testsuite/c-c++-common/vector-scalar.c
            ('svn:eol-style' added)

Propchange: trunk/gcc/testsuite/c-c++-common/vector-scalar.c
            ('svn:keywords' added)

Propchange: trunk/gcc/testsuite/g++.dg/ext/vector18.C
            ('svn:eol-style' added)

Propchange: trunk/gcc/testsuite/g++.dg/ext/vector18.C
            ('svn:keywords' added)


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2012-10-09  6:18 ` glisse at gcc dot gnu.org
@ 2012-10-25 13:03 ` glisse at gcc dot gnu.org
  2012-10-25 13:17 ` glisse at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-10-25 13:03 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Marc Glisse <glisse at gcc dot gnu.org> 2012-10-25 13:02:48 UTC ---
Author: glisse
Date: Thu Oct 25 13:02:42 2012
New Revision: 192808

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192808
Log:
2012-10-25  Marc Glisse  <marc.glisse@inria.fr>

    PR c++/54427

gcc/
    * tree.c (signed_or_unsigned_type_for): Handle vectors.

gcc/cp/
    * typeck.c (build_x_conditional_expr): Handle VEC_COND_EXPR.
    * call.c (build_conditional_expr_1): Likewise.

gcc/c-family/
    * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.

gcc/testsuite/
    * g++.dg/ext/vector19.C: New testcase.


Added:
    trunk/gcc/testsuite/g++.dg/ext/vector19.C   (with props)
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree.c

Propchange: trunk/gcc/testsuite/g++.dg/ext/vector19.C
            ('svn:eol-style' added)

Propchange: trunk/gcc/testsuite/g++.dg/ext/vector19.C
            ('svn:keywords' added)


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2012-10-25 13:03 ` glisse at gcc dot gnu.org
@ 2012-10-25 13:17 ` glisse at gcc dot gnu.org
  2013-04-12 13:59 ` glisse at gcc dot gnu.org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-10-25 13:17 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #11 from Marc Glisse <glisse at gcc dot gnu.org> 2012-10-25 13:17:06 UTC ---
>From a front-end perspective, we are getting close. Some remaining items:
- port ?: to the C front-end (I don't know the maybe_const stuff)
- support &&, ||, !
- make sure everything works with constexpr
- there is another PR about having a way to call sqrt on a vector
- (big item) have a better interface than an attribute, something that can be
deduced in template contexts as easily as std::array<type,nelts>...

There is more work in the middle-end.


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2012-10-25 13:17 ` glisse at gcc dot gnu.org
@ 2013-04-12 13:59 ` glisse at gcc dot gnu.org
  2013-05-07 21:59 ` glisse at gcc dot gnu.org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-04-12 13:59 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #12 from Marc Glisse <glisse at gcc dot gnu.org> 2013-04-12 13:59:33 UTC ---
Another piece that would be nice:
scalar1 ? vector : scalar2

(we already perform the conversion from scalar2 to vector when the condition is
a vector)


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2013-04-12 13:59 ` glisse at gcc dot gnu.org
@ 2013-05-07 21:59 ` glisse at gcc dot gnu.org
  2013-09-14 21:42 ` glisse at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-05-07 21:59 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #13 from Marc Glisse <glisse at gcc dot gnu.org> 2013-05-07 21:59:08 UTC ---
(In reply to comment #11)
> - support &&, ||, !

A patch was posted at:
http://gcc.gnu.org/ml/gcc-patches/2013-04/msg00783.html

but the only answer was against supporting the logical operators for vectors.


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2013-05-07 21:59 ` glisse at gcc dot gnu.org
@ 2013-09-14 21:42 ` glisse at gcc dot gnu.org
  2013-11-10  8:56 ` glisse at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-14 21:42 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gabriel at teuton dot org

--- Comment #14 from Marc Glisse <glisse at gcc dot gnu.org> ---
*** Bug 58422 has been marked as a duplicate of this bug. ***


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2013-09-14 21:42 ` glisse at gcc dot gnu.org
@ 2013-11-10  8:56 ` glisse at gcc dot gnu.org
  2014-10-03 19:57 ` glisse at gcc dot gnu.org
  2014-10-03 20:21 ` glisse at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-11-10  8:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Marc Glisse <glisse at gcc dot gnu.org> ---
Related PRs involving || and && for vectors: PR 57198 and PR 58845.
PR 58845 contains information about having a sequence point in the
gimplification of those operators.


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2013-11-10  8:56 ` glisse at gcc dot gnu.org
@ 2014-10-03 19:57 ` glisse at gcc dot gnu.org
  2014-10-03 20:21 ` glisse at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-10-03 19:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Marc Glisse <glisse at gcc dot gnu.org> ---
Author: glisse
Date: Fri Oct  3 19:57:01 2014
New Revision: 215872

URL: https://gcc.gnu.org/viewcvs?rev=215872&root=gcc&view=rev
Log:
2014-10-03  Marc Glisse  <marc.glisse@inria.fr>

    PR c++/54427
    PR c++/57198
    PR c++/58845
gcc/c-family/
    * c-common.c (warn_logical_operator): Punt for vectors.
gcc/cp/
    * typeck.c (cp_build_binary_op): save_expr after convert to save
    redundant operations.
    [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
    (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
gcc/
    * doc/extend.texi (Vector Extensions): Document &&, ||, ! in C++.
gcc/testsuite/
    * g++.dg/ext/vector9.C: Update, not an error anymore.
    * g++.dg/ext/vector27.C: Replace with new test.
    * g++.dg/ext/vector28.C: New file.
    * g++.dg/other/error23.C: Update to a different error.


Added:
    trunk/gcc/testsuite/g++.dg/ext/vector28.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/doc/extend.texi
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/ext/vector27.C
    trunk/gcc/testsuite/g++.dg/ext/vector9.C
    trunk/gcc/testsuite/g++.dg/other/error23.C


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

* [Bug c++/54427] Expose more vector extensions
  2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2014-10-03 19:57 ` glisse at gcc dot gnu.org
@ 2014-10-03 20:21 ` glisse at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-10-03 20:21 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.0

--- Comment #17 from Marc Glisse <glisse at gcc dot gnu.org> ---
I think it is time to close this PR. The main operations have been implemented,
most of the remaining ones are tracked in other PRs, and the rest should be as
this PR has become too long.


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

end of thread, other threads:[~2014-10-03 20:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-30 20:07 [Bug c++/54427] New: Expose more vector extensions glisse at gcc dot gnu.org
2012-09-03 10:38 ` [Bug c++/54427] " rguenth at gcc dot gnu.org
2012-09-14 17:17 ` glisse at gcc dot gnu.org
2012-09-14 17:22 ` glisse at gcc dot gnu.org
2012-09-20 19:01 ` pthaugen at gcc dot gnu.org
2012-09-20 19:13 ` pthaugen at gcc dot gnu.org
2012-09-20 19:47 ` glisse at gcc dot gnu.org
2012-09-21  9:20 ` glisse at gcc dot gnu.org
2012-09-27 10:06 ` glisse at gcc dot gnu.org
2012-10-09  6:18 ` glisse at gcc dot gnu.org
2012-10-25 13:03 ` glisse at gcc dot gnu.org
2012-10-25 13:17 ` glisse at gcc dot gnu.org
2013-04-12 13:59 ` glisse at gcc dot gnu.org
2013-05-07 21:59 ` glisse at gcc dot gnu.org
2013-09-14 21:42 ` glisse at gcc dot gnu.org
2013-11-10  8:56 ` glisse at gcc dot gnu.org
2014-10-03 19:57 ` glisse at gcc dot gnu.org
2014-10-03 20:21 ` glisse 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).