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] |
Other format: | [Raw text] |
As there's other means, it may not be that useful but for sure it's extremely convenient.I'm not sure that it is *so* useful for a user to have access to it, except for specialized cases:
I suppose you'll find such variant of a conditional move pattern in every piece of SSE code.2) selection operations on vectors, kind of (v1 <= v2 ? v3 : v4). These can be written for example like this:
cmpleps xmm1, xmm2 ; xmm1 = xmm1 <= xmm2 ? all-ones : 0 andnps xmm4, xmm1 ; xmm4 = xmm1 <= xmm2 ? 0 : xmm4 andps xmm1, xmm3 ; xmm1 = xmm1 <= xmm2 ? xmm3 : 0 orps xmm1, xmm4 ; xmm1 = xmm1 <= xmm2 ? xmm3 : xmm4
Yes, yes and yes.If we have a good extension for vector arithmetic, we should aim at improving it consistently rather than extending it in unpredictable ways. For example, another useful extension would be the ability to access vectors by item using x[n] (at least with constant expressions).
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |