Allow MODE_PARTIAL_INT modes for integer constant input operands.
gcc/ PR other/92090 * config/rs6000/predicates.md (input_operand): Allow MODE_PARTIAL_INT modes for integer constants. gcc/testsuite/ PR other/92090 * gcc.target/powerpc/pr92090.c: New test. From-SVN: r277928
This commit is contained in:
parent
d380e329a7
commit
8b4f2b5e08
4 changed files with 54 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2019-11-07 Peter Bergner <bergner@linux.ibm.com>
|
||||
|
||||
PR other/92090
|
||||
* config/rs6000/predicates.md (input_operand): Allow MODE_PARTIAL_INT
|
||||
modes for integer constants.
|
||||
|
||||
2019-11-07 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR ipa/92406
|
||||
|
|
|
@ -1047,8 +1047,7 @@
|
|||
return 1;
|
||||
|
||||
/* Allow any integer constant. */
|
||||
if (GET_MODE_CLASS (mode) == MODE_INT
|
||||
&& CONST_SCALAR_INT_P (op))
|
||||
if (SCALAR_INT_MODE_P (mode) && CONST_SCALAR_INT_P (op))
|
||||
return 1;
|
||||
|
||||
/* Allow easy vector constants. */
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2019-11-07 Peter Bergner <bergner@linux.ibm.com>
|
||||
|
||||
PR other/92090
|
||||
* gcc.target/powerpc/pr92090.c: New test.
|
||||
|
||||
2019-11-07 Feng Xue <fxue@os.amperecomputing.com>
|
||||
|
||||
PR tree-optimization/89134
|
||||
|
|
42
gcc/testsuite/gcc.target/powerpc/pr92090.c
Normal file
42
gcc/testsuite/gcc.target/powerpc/pr92090.c
Normal file
|
@ -0,0 +1,42 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mdejagnu-cpu=power8 -Os -mbig" } */
|
||||
|
||||
/* Verify that we don't ICE. */
|
||||
|
||||
_Atomic int a;
|
||||
_Atomic long double b, c;
|
||||
int j;
|
||||
void foo (void);
|
||||
void bar (int, int, int, int);
|
||||
|
||||
void
|
||||
bug (void)
|
||||
{
|
||||
b = 1;
|
||||
int d, e, f, g;
|
||||
while (a)
|
||||
;
|
||||
for (int h = 0; h < 10000; h++)
|
||||
{
|
||||
double i = b /= 3;
|
||||
foo ();
|
||||
if (i)
|
||||
{
|
||||
if (i == 1)
|
||||
d++;
|
||||
e++;
|
||||
b = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i == 2)
|
||||
f++;
|
||||
g++;
|
||||
b = 1;
|
||||
}
|
||||
}
|
||||
bar (d, e, f, g);
|
||||
c = 1;
|
||||
for (int h; h; h++)
|
||||
j = 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue