https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77621
--- Comment #11 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to rguent...@suse.de 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? True. > 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 + && !TARGET_VECTORIZE_DOUBLE) + 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.