diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2017-10-24 07:26:52 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-10-24 07:26:52 +0000 |
commit | bc2a7cebfda15f53bc8fa4b596e96a87b53193fe (patch) | |
tree | 5835f9cdd7df1edbcc8445fba0d12041daf92a71 /gcc/cfgexpand.c | |
parent | d32bc875d2297f2f2240e8aad2082be4d1f851d8 (diff) | |
download | gcc-bc2a7cebfda15f53bc8fa4b596e96a87b53193fe.zip gcc-bc2a7cebfda15f53bc8fa4b596e96a87b53193fe.tar.gz gcc-bc2a7cebfda15f53bc8fa4b596e96a87b53193fe.tar.bz2 |
re PR middle-end/82569 (failure in 177.mesa cpu2000 test case after r253530)
PR middle-end/82569
* tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
* expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
* loop-iv.c (iv_get_reaching_def): Likewise.
* cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
variable is promoted and the partition contains undefined values.
From-SVN: r254037
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 00efe14..ec8c845 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1391,10 +1391,18 @@ expand_one_ssa_partition (tree var) } machine_mode reg_mode = promote_ssa_mode (var, NULL); - rtx x = gen_reg_rtx (reg_mode); set_rtl (var, x); + + /* For a promoted variable, X will not be used directly but wrapped in a + SUBREG with SUBREG_PROMOTED_VAR_P set, which means that the RTL land + will assume that its upper bits can be inferred from its lower bits. + Therefore, if X isn't initialized on every path from the entry, then + we must do it manually in order to fulfill the above assumption. */ + if (reg_mode != TYPE_MODE (TREE_TYPE (var)) + && bitmap_bit_p (SA.partitions_for_undefined_values, part)) + emit_move_insn (x, CONST0_RTX (reg_mode)); } /* Record the association between the RTL generated for partition PART |