diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-06-26 10:02:20 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-06-26 10:02:20 +0200 |
commit | 5dcf6b7f1cfee8b04d3bbe6f0f1b526b0c628742 (patch) | |
tree | daf4ca99cd6ee7a4f6237322a757f37ce436bda1 /gcc/tree-ssa-phiopt.c | |
parent | eaccea2afa9be40d1d976292da8450cb36439d5f (diff) | |
download | gcc-5dcf6b7f1cfee8b04d3bbe6f0f1b526b0c628742.zip gcc-5dcf6b7f1cfee8b04d3bbe6f0f1b526b0c628742.tar.gz gcc-5dcf6b7f1cfee8b04d3bbe6f0f1b526b0c628742.tar.bz2 |
re PR tree-optimization/53748 (ice in fold_convert_loc)
PR tree-optimization/53748
* tree-ssa-phiopt.c (conditional_replacement): Only optimize
if arg0/arg1 have integral or pointer types.
* gcc.c-torture/compile/pr53748.c: New test.
From-SVN: r188975
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
-rw-r--r-- | gcc/tree-ssa-phiopt.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index 52be150..46d8a2c 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -615,8 +615,12 @@ conditional_replacement (basic_block cond_bb, basic_block middle_bb, bool neg; /* FIXME: Gimplification of complex type is too hard for now. */ - if (TREE_CODE (TREE_TYPE (arg0)) == COMPLEX_TYPE - || TREE_CODE (TREE_TYPE (arg1)) == COMPLEX_TYPE) + /* We aren't prepared to handle vectors either (and it is a question + if it would be worthwhile anyway). */ + if (!(INTEGRAL_TYPE_P (TREE_TYPE (arg0)) + || POINTER_TYPE_P (TREE_TYPE (arg0))) + || !(INTEGRAL_TYPE_P (TREE_TYPE (arg1)) + || POINTER_TYPE_P (TREE_TYPE (arg1)))) return false; /* The PHI arguments have the constants 0 and 1, or 0 and -1, then |