Commit a82e045d by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/45739 (static evaluation of SSE intrinsics (pxor))

	PR rtl-optimization/45739
	* simplify-rtx.c (simplify_binary_operation_1): Optimize even
	vector mode | CONST0_RTX (mode) and ^ CONST0_RTX (mode).

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

From-SVN: r164501
parent 29a80ea6
2010-09-22 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/45739
* simplify-rtx.c (simplify_binary_operation_1): Optimize even
vector mode | CONST0_RTX (mode) and ^ CONST0_RTX (mode).
2010-09-21 Anatoly Sokolov <aesok@post.ru>
* config/rs6000/rs6000.h (OUTPUT_ADDR_CONST_EXTRA): Remove macros.
......
......@@ -2260,7 +2260,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
break;
case IOR:
if (trueop1 == const0_rtx)
if (trueop1 == CONST0_RTX (mode))
return op0;
if (CONST_INT_P (trueop1)
&& ((INTVAL (trueop1) & GET_MODE_MASK (mode))
......@@ -2402,7 +2402,7 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode,
break;
case XOR:
if (trueop1 == const0_rtx)
if (trueop1 == CONST0_RTX (mode))
return op0;
if (CONST_INT_P (trueop1)
&& ((INTVAL (trueop1) & GET_MODE_MASK (mode))
......
2010-09-22 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/45739
* gcc.target/i386/pr45739.c: New test.
2010-09-21 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/45648
......
/* PR rtl-optimization/45739 */
/* { dg-do compile } */
/* { dg-options "-O2 -msse2" } */
#include <emmintrin.h>
__m128i var;
void
foo (void)
{
__m128i zero = _mm_setzero_si128 ();
var = _mm_xor_si128 (zero, var);
}
void
bar (void)
{
__m128i zero = _mm_setzero_si128 ();
var = _mm_or_si128 (var, zero);
}
/* { dg-final { scan-assembler-not "pxor" } } */
/* { dg-final { scan-assembler-not "por" } } */
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