diff options
author | Bill Schmidt <wschmidt@linux.ibm.com> | 2012-06-18 12:22:37 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2012-06-18 12:22:37 +0000 |
commit | 9b10be32fd3295d086c4a4cef68e9139a7a07f85 (patch) | |
tree | 050a04211fcff225eb26ab491fbd34278b2cb418 /gcc/tree-ssa-phiopt.c | |
parent | d421b10cd17c92b2705aeb4f279792dced9f896d (diff) | |
download | gcc-9b10be32fd3295d086c4a4cef68e9139a7a07f85.zip gcc-9b10be32fd3295d086c4a4cef68e9139a7a07f85.tar.gz gcc-9b10be32fd3295d086c4a4cef68e9139a7a07f85.tar.bz2 |
re PR tree-optimization/53703 (verify_ssa: definition in block 105 does not dominate use in block 103)
gcc:
2012-06-18 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/53703
* tree-ssa-phiopt.c (hoist_adjacent_loads): Skip virtual phis;
correctly set bb_for_def[12].
gcc/testsuite:
2012-06-18 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/53703
* gcc.dg/torture/pr53703.c: New test.
From-SVN: r188731
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
-rw-r--r-- | gcc/tree-ssa-phiopt.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c index c64e8e2..52be150 100644 --- a/gcc/tree-ssa-phiopt.c +++ b/gcc/tree-ssa-phiopt.c @@ -1853,7 +1853,9 @@ hoist_adjacent_loads (basic_block bb0, basic_block bb1, if (TREE_CODE (arg1) != SSA_NAME || TREE_CODE (arg2) != SSA_NAME || SSA_NAME_IS_DEFAULT_DEF (arg1) - || SSA_NAME_IS_DEFAULT_DEF (arg2)) + || SSA_NAME_IS_DEFAULT_DEF (arg2) + || !is_gimple_reg (arg1) + || !is_gimple_reg (arg2)) continue; def1 = SSA_NAME_DEF_STMT (arg1); @@ -1914,17 +1916,11 @@ hoist_adjacent_loads (basic_block bb0, basic_block bb1, defswap = def1; def1 = def2; def2 = defswap; - /* Don't swap bb1 and bb2 as we may have more than one - phi to process successfully. */ - bb_for_def1 = bb2; - bb_for_def2 = bb1; - } - else - { - bb_for_def1 = bb1; - bb_for_def2 = bb2; } + bb_for_def1 = gimple_bb (def1); + bb_for_def2 = gimple_bb (def2); + /* Check for proper alignment of the first field. */ tree_offset1 = bit_position (field1); tree_offset2 = bit_position (field2); |