mirror of git://gcc.gnu.org/git/gcc.git
tree-switch-conversion.c (emit_case_bit_tests): Generate MINUS_EXPR in unsigned type.
2012-08-06 Tom de Vries <tom@codesourcery.com> * tree-switch-conversion.c (emit_case_bit_tests): Generate MINUS_EXPR in unsigned type. From-SVN: r190168
This commit is contained in:
parent
d7f41b2d87
commit
d9e408ded1
|
|
@ -1,3 +1,8 @@
|
|||
2012-08-06 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* tree-switch-conversion.c (emit_case_bit_tests): Generate MINUS_EXPR in
|
||||
unsigned type.
|
||||
|
||||
2012-08-05 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
|
||||
|
||||
* doc/invoke.texi: Document AMD btver2.
|
||||
|
|
|
|||
|
|
@ -384,10 +384,10 @@ emit_case_bit_tests (gimple swtch, tree index_expr,
|
|||
|
||||
gsi = gsi_last_bb (switch_bb);
|
||||
|
||||
/* idx = (unsigned) (x - minval) */
|
||||
idx = fold_build2 (MINUS_EXPR, index_type, index_expr,
|
||||
fold_convert (index_type, minval));
|
||||
idx = fold_convert (unsigned_index_type, idx);
|
||||
/* idx = (unsigned)x - minval. */
|
||||
idx = fold_convert (unsigned_index_type, index_expr);
|
||||
idx = fold_build2 (MINUS_EXPR, unsigned_index_type, idx,
|
||||
fold_convert (unsigned_index_type, minval));
|
||||
idx = force_gimple_operand_gsi (&gsi, idx,
|
||||
/*simple=*/true, NULL_TREE,
|
||||
/*before=*/true, GSI_SAME_STMT);
|
||||
|
|
|
|||
Loading…
Reference in New Issue