--- Comment #11 from UroŇ° Bizjak <ubizjak at gmail dot com> ---
(In reply to from comment #9)

> I believe atom _does_ have full SSE2 support, no?  Using intrinsics
> (even those expanding to GCC generic vector extension code) should
> end up emitting SSE2 double instructions?


> So what you want to tell the vectorizer is to not introduce vectorized
> code using V2DFmode.  I still think a better way is to handle this
> via costs (like a loop with mostly integer ops but a single FP double
> op is probably still profitable to vectorize).

The patch, attached in the previous message implements the above suggestion,
and also fixes the testcase with -mtune=atom. However, I have no performance
data to base cost values on, so the patch artificially rises the cost of DFmode
vector insns for 20:

+  /* FIXME: The value here is arbitrary
+     and could potentially be improved with analysis.  */
+  if (vectype && GET_MODE_INNER (TYPE_MODE (vectype)) == DFmode
+    cost += 20;


> not sure why we override TYPE_MODE with preferred_simd_mode.  It's not
> that the x86 backend will emit word_mode loads/stores for V2DFmode
> loads/stores on i?86 with -mtune=atom?

Oh... no. We *do* have V2DFmode, but we want to avoid it as much as possible.

Reply via email to