Commit 1704194a by Jakub Jelinek Committed by Jakub Jelinek

re PR target/85508 (runtime error in config/i386/i386.c)

	PR target/85508
	* config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
	instead of INTVAL when shifting x left.

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

From-SVN: r259594
parent 062c0a7b
2018-04-24 Jakub Jelinek <jakub@redhat.com>
PR target/85508
* config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
instead of INTVAL when shifting x left.
2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com> 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
PR tree-optimization/85478 PR tree-optimization/85478
......
...@@ -43194,7 +43194,7 @@ ix86_expand_vector_init_one_var (bool mmx_ok, machine_mode mode, ...@@ -43194,7 +43194,7 @@ ix86_expand_vector_init_one_var (bool mmx_ok, machine_mode mode,
else else
{ {
var = convert_modes (HImode, QImode, var, true); var = convert_modes (HImode, QImode, var, true);
x = gen_int_mode (INTVAL (x) << 8, HImode); x = gen_int_mode (UINTVAL (x) << 8, HImode);
} }
if (x != const0_rtx) if (x != const0_rtx)
var = expand_simple_binop (HImode, IOR, var, x, var, var = expand_simple_binop (HImode, IOR, var, x, var,
2018-04-24 Jakub Jelinek <jakub@redhat.com>
PR target/85508
* gcc.target/i386/pr85508.c: New test.
2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com> 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
PR tree-optimization/85478 PR tree-optimization/85478
......
/* PR target/85508 */
/* { dg-do compile } */
/* { dg-options "-O2 -msse2" } */
typedef signed char V __attribute__((vector_size (16)));
signed char c;
V
foo (void)
{
return (V) { c, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
}
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