+2012-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/54592
+ * config/i386/i386.c (ix86_rtx_costs): Limit > UNITS_PER_WORD
+ AND/IOR/XOR cost calculation to MODE_INT class modes.
+
2012-09-18 Thomas Quinot <quinot@adacore.com>
* doc/invoke.texi: Document -fada-spec-parent.
case AND:
case IOR:
case XOR:
- if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
+ if (GET_MODE_CLASS (mode) == MODE_INT
+ && GET_MODE_SIZE (mode) > UNITS_PER_WORD)
{
*total = (cost->add * 2
+ (rtx_cost (XEXP (x, 0), outer_code, opno, speed)
2012-09-18 Jakub Jelinek <jakub@redhat.com>
+ PR target/54592
+ * gcc.target/i386/pr54592.c: New test.
+
PR tree-optimization/54610
* gcc.target/i386/pr54610.c: New test.
--- /dev/null
+/* PR target/54592 */
+/* { dg-do compile } */
+/* { dg-options "-Os -msse2" } */
+/* { dg-require-effective-target sse2 } */
+
+#include <emmintrin.h>
+
+void
+func (__m128i * foo, size_t a, size_t b, int *dst)
+{
+ __m128i x = foo[a];
+ __m128i y = foo[b];
+ __m128i sum = _mm_add_epi32 (x, y);
+ *dst = _mm_cvtsi128_si32 (sum);
+}
+
+/* { dg-final { scan-assembler "paddd\[^\n\r\]*(\\(\[^\n\r\]*\\)|XMMWORD PTR)" } } */