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

Re: [x86] Replace builtins with vector extensions

On Fri, 17 Oct 2014, Uros Bizjak wrote:

While looking correct, I am a bit nervous about avx512fintrin.h
changes, mainly because I have not much experience with these
patterns. I have adder Kirill to CC for possible comments.

He asked for this part of the patch, and tested it:

I don't have many comments on simple arithmetic, and changes look
"trivial". I'd say that simple arithmetic part is OK for branch.

Thanks. I am testing the updated patch tonight and I'll commit. I am planning on making a branch: ^/branches/x86-intrinsics-ext if noone complains about the name.

One last note: scalar builtins preserve highpart of target register.
IIRC, I have tried to convert _mm_frcz_s{s,d} to use scalars, but
resulted in a horrible code. Current approach uses
__builtin_ia32_movs{s,d} to generate optimal code, but I didn't test
if current gcc improved in this part.

Operations that act on only part of a vector do tend to go badly indeed. I remember working on something related at some point (the goal was to handle v[0]+=2):

I don't remember exactly why I gave up on this. It may be a different issue from yours with frcz, but I kept the impression from then that builtins were still the way to go for anything non-trivial.

Marc Glisse

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