aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.h
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-08-08 11:30:13 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-08-08 11:30:13 +0000
commit0f336c35d5317473e1d5536ef57573f714323ec6 (patch)
treeab403f41f50caaf2a0fd7966b13ae7b058ab89d6 /gcc/gimple.h
parentb2077fd226f648da2135c9e4b5ba536a66d50d14 (diff)
downloadgcc-0f336c35d5317473e1d5536ef57573f714323ec6.zip
gcc-0f336c35d5317473e1d5536ef57573f714323ec6.tar.gz
gcc-0f336c35d5317473e1d5536ef57573f714323ec6.tar.bz2
re PR tree-optimization/37056 (ICE in build2_stat, at tree.c:3257)
2008-08-08 Richard Guenther <rguenther@suse.de> PR tree-optimization/37056 * gimple.h (gimple_assign_rhs_class): New helper function. * tree-ssa-loop-niter.c (get_val_for): Fix tuplification, handle unary operations properly. * gcc.c-torture/compile/pr37056.c: New testcase. From-SVN: r138865
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r--gcc/gimple.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 0c11f3e..f32600d 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1834,6 +1834,17 @@ gimple_assign_set_rhs_code (gimple s, enum tree_code code)
}
+/* Return the gimple rhs class of the code of the expression computed on
+ the rhs of assignment statement GS.
+ This will never return GIMPLE_INVALID_RHS. */
+
+static inline enum gimple_rhs_class
+gimple_assign_rhs_class (const_gimple gs)
+{
+ return get_gimple_rhs_class (gimple_assign_rhs_code (gs));
+}
+
+
/* Return true if S is a type-cast assignment. */
static inline bool