diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2015-06-08 14:20:43 +0200 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2015-06-08 12:20:43 +0000 |
commit | 7026b8dfd18fc18e7110c193b1a41d4bb119c8c7 (patch) | |
tree | 8954bbe503c4e0b9dc95d956f6c7c4a7d7676744 /gcc | |
parent | 1b7f61ebc8920326b5dc30f79cfc86ef0cb7bb28 (diff) | |
download | gcc-7026b8dfd18fc18e7110c193b1a41d4bb119c8c7.zip gcc-7026b8dfd18fc18e7110c193b1a41d4bb119c8c7.tar.gz gcc-7026b8dfd18fc18e7110c193b1a41d4bb119c8c7.tar.bz2 |
genmatch.c (expr::gen_transform): For conditions, guess the type from the second operand.
2015-06-08 Marc Glisse <marc.glisse@inria.fr>
* genmatch.c (expr::gen_transform): For conditions, guess the type
from the second operand.
From-SVN: r224220
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/genmatch.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e33780f..e7616d3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-06-08 Marc Glisse <marc.glisse@inria.fr> + + * genmatch.c (expr::gen_transform): For conditions, guess the type + from the second operand. + 2015-06-08 Tom de Vries <tom@codesourcery.com> PR tree-optimization/66442 diff --git a/gcc/genmatch.c b/gcc/genmatch.c index 9dc3b8c..f271703 100644 --- a/gcc/genmatch.c +++ b/gcc/genmatch.c @@ -1709,6 +1709,13 @@ expr::gen_transform (FILE *f, const char *dest, bool gimple, int depth, sprintf (optype, "boolean_type_node"); type = optype; } + else if (*operation == COND_EXPR + || *operation == VEC_COND_EXPR) + { + /* Conditions are of the same type as their first alternative. */ + sprintf (optype, "TREE_TYPE (ops%d[1])", depth); + type = optype; + } else { /* Other operations are of the same type as their first operand. */ |