This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Allow % to work on vectors


Hi,
  This patch allows for % (remainder) to work on integer vectors.
This does not add any patterns that optimize % to just division with a
subtraction of vector types though, that will be for a seperate patch.

OK? Bootstrapped and tested on i686-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
* c-typeck.c (build_binary_op): Allow % on integal vectors.
* doc/extend.texi (Vector Extension): Document that % is allowed too.

cp/ChangeLog:
* typeck.c (build_binary_op): Allow % on integal vectors.

testsuite/ChangeLog:
* gcc.dg/vector-4.c: New testcase.
* gcc.dg/simd-1b.c: % is now allowed for integer vectors.
* g++.dg/ext/vector16.C: New testcase.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]