diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-08 11:30:13 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-08 11:30:13 +0000 |
commit | b87477876194a77fd92bf1535bd9a690cd33067f (patch) | |
tree | ab403f41f50caaf2a0fd7966b13ae7b058ab89d6 /gcc/gimple.h | |
parent | f08b701cb43c651acbd9401ac92b8ea331dbd00e (diff) | |
download | gcc-b87477876194a77fd92bf1535bd9a690cd33067f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138865 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index 0c11f3ebfa7..f32600daf91 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 |