diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-07 17:15:02 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-02-07 17:15:02 +0000 |
commit | 2e620dc777f67573bdb7d47f1f78d86f5cfcb392 (patch) | |
tree | 56311bdf8734bb5677f0044a0e6e8b21916b4c00 /gcc/lra-constraints.c | |
parent | 0ba4d8e86d86979b15b23c791d4d0d0cfd4197fa (diff) | |
download | gcc-2e620dc777f67573bdb7d47f1f78d86f5cfcb392.tar.gz |
2013-02-07 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/56225
* lra-constraints.c (process_alt_operands): Check that reload hard
reg can hold value for strict_low_part.
2013-02-07 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/56225
* gcc.target/i386/pr56225.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195856 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r-- | gcc/lra-constraints.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index cc288540fc2..932b699696b 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -1895,7 +1895,22 @@ process_alt_operands (int only_alternative) ? in_hard_reg_set_p (this_alternative_set, mode, hard_regno[nop]) : in_class_p (op, this_alternative, NULL)))) - losers++; + { + /* Strict_low_part requires reload the register not + the sub-register. In this case we should check + that a final reload hard reg can hold the + value. */ + if (curr_static_id->operand[nop].strict_low + && REG_P (op) + && hard_regno[nop] < 0 + && GET_CODE (*curr_id->operand_loc[nop]) == SUBREG + && ira_class_hard_regs_num[this_alternative] > 0 + && ! HARD_REGNO_MODE_OK (ira_class_hard_regs + [this_alternative][0], + GET_MODE (op))) + goto fail; + losers++; + } if (operand_reg[nop] != NULL_RTX /* Output operands and matched input operands are not inherited. The following conditions do not |