On Thu, 3 Jul 2014, Kirill Yukhin wrote:
Hello Marc,
On 28 Jun 12:42, Marc Glisse wrote:
It would enable a number of optimizations, like constant
propagation, FMA contraction, etc. It would also allow us to remove
several builtins.
This should be main motivation for replacing built-ins.
But this approach IMHO should only be used for `obvious' cases only.
I mean: + - / * and friends.
Think that this shouldn't apply for shuffles, broadcasts.
But we have to define border between `obvious' and rest intrinsics.
We don't have a syntax in the front-end for broadcasts anyway, but are you
sure about shuffles? __builtin_shuffle directly translates to
VEC_PERM_EXPR, on which we are careful to avoid optimizations like
combining 2 shuffles unless the result is the identity. And expanding
shuffles that can be done in a single instruction works well.
But I am happy not doing them yet. To be very specific, could you list
which intrinsics you would like to remove from the posted patch?
On the over hand, updated in such a way intrinsic
may actually generate different instruction then intended (e.g. FMA case).
It is the same with scalars, we have -ffp-contract for that.
For ICC this is generally OK to generate different instructions, only
semantics should be obeyed.
--
Marc Glisse