Commit 68e28cfd by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/54592 (Cannot fuse SSE move and add together)

	PR target/54592
	* config/i386/i386.c (ix86_rtx_costs): Limit > UNITS_PER_WORD
	AND/IOR/XOR cost calculation to MODE_INT class modes.

	* gcc.target/i386/pr54592.c: New test.

From-SVN: r191430
parent 0b07a57e
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.
......
......@@ -32792,7 +32792,8 @@ ix86_rtx_costs (rtx x, int code_i, int outer_code_i, int opno, int *total,
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.
......
/* 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)" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment