@@ -1709,7 +1709,8 @@ (define_expand "btruncv2sf2"
[(match_operand:V2SF 1 "register_operand")
(match_dup 2)]
UNSPEC_ROUND))]
- "TARGET_SSE4_1 && !flag_trapping_math"
+ "TARGET_SSE4_1 && !flag_trapping_math
+ && TARGET_MMX_WITH_SSE"
"operands[2] = GEN_INT (ROUND_TRUNC | ROUND_NO_EXC);")
(define_insn "*mmx_roundv2sf2"
new file mode 100644
@@ -0,0 +1,10 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-Ofast -m3dnow -msse4.1" } */
+
+float *foo_p;
+
+void
+foo(float *__restrict q) {
+ foo_p[0] = __builtin_truncf(q[0]);
+ foo_p[1] = __builtin_truncf(q[1]);
+}