mirror of git://gcc.gnu.org/git/gcc.git
parent
1da7d8c0d3
commit
1bbc6693c9
|
@ -1,3 +1,8 @@
|
||||||
|
2011-02-11 Xinliang David Li <davidxl@google.com>
|
||||||
|
|
||||||
|
PR tree-optimization/47707
|
||||||
|
* tree-chrec.c (convert_affine_scev): Keep type precision.
|
||||||
|
|
||||||
2011-02-11 Eric Botcazou <ebotcazou@adacore.com>
|
2011-02-11 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
PR tree-optimization/47420
|
PR tree-optimization/47420
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2011-02-11 Xinliang David Li <davidxl@google.com>
|
||||||
|
|
||||||
|
PR tree-optimization/47707
|
||||||
|
* g++.dg/tree-ssa/pr47707.C: New test.
|
||||||
|
|
||||||
2011-02-11 Eric Botcazou <ebotcazou@adacore.com>
|
2011-02-11 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* g++.dg/opt/inline17.C: New test.
|
* g++.dg/opt/inline17.C: New test.
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
/* { dg-do run } */
|
||||||
|
/* { dg-options "-O2 -fno-tree-vrp" } */
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
struct CH
|
||||||
|
{
|
||||||
|
unsigned char ch : 3;
|
||||||
|
} ch;
|
||||||
|
|
||||||
|
__attribute__((noinline)) void MakeCheckOp (unsigned int *v1, unsigned int *v2)
|
||||||
|
{
|
||||||
|
assert (*v1 == *v2);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int main (void)
|
||||||
|
{
|
||||||
|
|
||||||
|
int len;
|
||||||
|
|
||||||
|
for (len = 4; len >= 1; len--)
|
||||||
|
{
|
||||||
|
unsigned v1, v2;
|
||||||
|
ch.ch = len;
|
||||||
|
v1 = ch.ch;
|
||||||
|
v2 = len;
|
||||||
|
MakeCheckOp (&v1, &v2);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1238,8 +1238,11 @@ convert_affine_scev (struct loop *loop, tree type,
|
||||||
performed by default when CT is signed. */
|
performed by default when CT is signed. */
|
||||||
new_step = *step;
|
new_step = *step;
|
||||||
if (TYPE_PRECISION (step_type) > TYPE_PRECISION (ct) && TYPE_UNSIGNED (ct))
|
if (TYPE_PRECISION (step_type) > TYPE_PRECISION (ct) && TYPE_UNSIGNED (ct))
|
||||||
new_step = chrec_convert_1 (signed_type_for (ct), new_step, at_stmt,
|
{
|
||||||
|
tree signed_ct = build_nonstandard_integer_type (TYPE_PRECISION (ct), 0);
|
||||||
|
new_step = chrec_convert_1 (signed_ct, new_step, at_stmt,
|
||||||
use_overflow_semantics);
|
use_overflow_semantics);
|
||||||
|
}
|
||||||
new_step = chrec_convert_1 (step_type, new_step, at_stmt, use_overflow_semantics);
|
new_step = chrec_convert_1 (step_type, new_step, at_stmt, use_overflow_semantics);
|
||||||
|
|
||||||
if (automatically_generated_chrec_p (new_base)
|
if (automatically_generated_chrec_p (new_base)
|
||||||
|
@ -1579,4 +1582,3 @@ evolution_function_right_is_integer_cst (const_tree chrec)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue