diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-08-22 10:27:46 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-08-22 10:27:46 +0000 |
commit | f733cf303bcdc952c92b81dd62199a40a1f555ec (patch) | |
tree | 0a9a9e0f28aa7c7f5bc4d1d1d0e9647163cac4f7 /gcc/tree-ssa-phiopt.c | |
parent | e0e4357b88efe5dc53e50d341a09de4d02331200 (diff) | |
download | gcc-tarball-gcc-6.2.0.tar.gz |
gcc-6.2.0gcc-6.2.0
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
-rw-r--r-- | gcc/tree-ssa-phiopt.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index a752fe0fd1..caf591bc52 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -438,15 +438,18 @@ factor_out_conditional_conversion (edge e0, edge e1, gphi *phi, /* Check if arg0 is an SSA_NAME and the stmt which defines arg0 is a conversion. */ arg0_def_stmt = SSA_NAME_DEF_STMT (arg0); - if (!is_gimple_assign (arg0_def_stmt) - || !gimple_assign_cast_p (arg0_def_stmt)) + if (!gimple_assign_cast_p (arg0_def_stmt)) return NULL; /* Use the RHS as new_arg0. */ convert_code = gimple_assign_rhs_code (arg0_def_stmt); new_arg0 = gimple_assign_rhs1 (arg0_def_stmt); if (convert_code == VIEW_CONVERT_EXPR) - new_arg0 = TREE_OPERAND (new_arg0, 0); + { + new_arg0 = TREE_OPERAND (new_arg0, 0); + if (!is_gimple_reg_type (TREE_TYPE (new_arg0))) + return NULL; + } if (TREE_CODE (arg1) == SSA_NAME) { |