diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-11 08:27:00 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-11 08:27:00 +0000 |
commit | 3de988b56cf43973a8fb6f97b7b983d690323b87 (patch) | |
tree | edef1ecdf13bbb8fb78a6e4be799ab1a487a80db /gcc/tree-ssa-loop-im.c | |
parent | ac835c6e54351eccb262c2fc56a7592a1f5a11ee (diff) | |
download | gcc-3de988b56cf43973a8fb6f97b7b983d690323b87.tar.gz |
2008-02-11 Uros Bizjak <ubizjak@gmail.com>
Richard Guenther <rguenther@suse.de>
PR tree-optimization/33992
* tree-ssa-loop-im.c (rewrite_bittest): Fixup the type of
the zero we compare against.
* gcc.c-torture/execute/pr33992.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132234 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r-- | gcc/tree-ssa-loop-im.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 262ad972da8..cad14452a16 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -685,7 +685,12 @@ rewrite_bittest (block_stmt_iterator *bsi) stmt2 = build_gimple_modify_stmt (var, t); name = make_ssa_name (var, stmt2); GIMPLE_STMT_OPERAND (stmt2, 0) = name; + + /* Replace the SSA_NAME we compare against zero. Adjust + the type of zero accordingly. */ SET_USE (use, name); + TREE_OPERAND (COND_EXPR_COND (use_stmt), 1) + = build_int_cst_type (TREE_TYPE (name), 0); bsi_insert_before (bsi, stmt1, BSI_SAME_STMT); bsi_replace (bsi, stmt2, true); |