OSDN Git Service

* config/i386/xmmintrin.h (_mm_prefetch): Added const to first arg.
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-ifcombine.c
index 9486e54..eef6f22 100644 (file)
@@ -6,7 +6,7 @@ This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GCC is distributed in the hope that it will be useful,
@@ -15,9 +15,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
@@ -313,9 +312,9 @@ ifcombine_ifandif (basic_block inner_cond_bb, basic_block outer_cond_bb)
       /* Do it.  */
       bsi = bsi_for_stmt (inner_cond);
       t = fold_build2 (LSHIFT_EXPR, TREE_TYPE (name1),
-                      integer_one_node, bit1);
+                      build_int_cst (TREE_TYPE (name1), 1), bit1);
       t2 = fold_build2 (LSHIFT_EXPR, TREE_TYPE (name1),
-                       integer_one_node, bit2);
+                       build_int_cst (TREE_TYPE (name1), 1), bit2);
       t = fold_build2 (BIT_IOR_EXPR, TREE_TYPE (name1), t, t2);
       t = force_gimple_operand_bsi (&bsi, t, true, NULL_TREE,
                                    true, BSI_SAME_STMT);
@@ -484,6 +483,9 @@ ifcombine_iforif (basic_block inner_cond_bb, basic_block outer_cond_bb)
       /* Do it.  */
       t = fold_build2 (code, boolean_type_node,
                       TREE_OPERAND (ccond2, 0), TREE_OPERAND (ccond2, 1));
+      t = canonicalize_cond_expr_cond (t);
+      if (!t)
+       return false;
       COND_EXPR_COND (inner_cond) = t;
       update_stmt (inner_cond);