Commit 53c1275b by Jakub Jelinek Committed by Jakub Jelinek

re PR target/57736 (ICE in emit_move_insn with __builtin_ia32_rdtsc)

	PR target/57736
	* config/i386/i386.c (ix86_expand_builtin): If target == NULL
	and mode is VOIDmode, don't create a VOIDmode pseudo to copy result
	into.

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

From-SVN: r200555
parent 1141ed3f
2013-06-28 Jakub Jelinek <jakub@redhat.com>
PR target/57736
* config/i386/i386.c (ix86_expand_builtin): If target == NULL
and mode is VOIDmode, don't create a VOIDmode pseudo to copy result
into.
2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* builtins.def: Fixed the function type of CILKPLUS_BUILTIN.
......
......@@ -32218,7 +32218,13 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
}
if (target == 0)
target = gen_reg_rtx (mode);
{
/* mode is VOIDmode if __builtin_rd* has been called
without lhs. */
if (mode == VOIDmode)
return target;
target = gen_reg_rtx (mode);
}
if (TARGET_64BIT)
{
2013-06-28 Jakub Jelinek <jakub@redhat.com>
PR target/57736
* gcc.target/i386/pr57736.c: New test.
2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-c++-common/cilk-plus/AN/decl-ptr-colon.c (main): Made this testcase
......
/* PR target/57736 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
#include <x86intrin.h>
unsigned long long
f1 (void)
{
return __rdtsc ();
}
unsigned long long
f2 (unsigned int *x)
{
return __rdtscp (x);
}
unsigned long long
f3 (unsigned int x)
{
return __rdpmc (x);
}
void
f4 (void)
{
__rdtsc ();
}
void
f5 (unsigned int *x)
{
__rdtscp (x);
}
void
f6 (unsigned int x)
{
__rdpmc (x);
}
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