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
This commit is contained in:
parent
0b07a57e8c
commit
68e28cfd16
4 changed files with 28 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
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)
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
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.
|
||||
|
||||
|
|
17
gcc/testsuite/gcc.target/i386/pr54592.c
Normal file
17
gcc/testsuite/gcc.target/i386/pr54592.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* 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)" } } */
|
Loading…
Add table
Reference in a new issue