This is the mail archive of the gcc@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]

Using SSE packed types for complex number arithmetics


Hi
What I am thinking about is to generate packed operations for the complex
numbers in gcc. This should imply ABI changes on x86_64 (to pass complex
numberspacked in single registers), so I would like to ask for comments whether
this is good idea - I am not very skilled SSE coder nor understand in detail
the gcc handling of complex numbers yet.

So the question is:
1) Is SSE sitable for doing complex arithmetics using packets
2) Can gcc handle it easilly?
3) Does C99 mandate some special behaviour on passing complex numbers?
4) Is this feature worthwhile?  It can be partly obsoletted by the
   autovectorization pass.

On gcc side, thinks seems to be quite natural - we already have modes for
complex numbers, so we can add expanders for the operations on those and
do the arithmetics.  I guess simplify-rtx/combine will need updating, but
I believe that on gcc side all important infrastructure should can be on place
already.

On the SSE side, plus/minus seems to be trivially doable in SSE and mult/div
requires little effort, but still can be nearly twice as fast as split
alternative.  The comparisons should be comparative too.

On the c99 side I duno yet.

Any comments?


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