aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-im.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2008-02-11 09:27:00 +0100
committerRichard Biener <rguenth@gcc.gnu.org>2008-02-11 08:27:00 +0000
commita6e2d11207bc4d7bbaf07024724382f63848382b (patch)
treeedef1ecdf13bbb8fb78a6e4be799ab1a487a80db /gcc/tree-ssa-loop-im.c
parent35f1ca2f842d52502504d29a378247dd72767f8a (diff)
downloadgcc-a6e2d11207bc4d7bbaf07024724382f63848382b.zip
gcc-a6e2d11207bc4d7bbaf07024724382f63848382b.tar.gz
gcc-a6e2d11207bc4d7bbaf07024724382f63848382b.tar.bz2
re PR tree-optimization/33992 (Miscompiles function with inlining, breaks profiledbootstrap)
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. Co-Authored-By: Richard Guenther <rguenther@suse.de> From-SVN: r132234
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r--gcc/tree-ssa-loop-im.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 262ad97..cad1445 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);