diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-23 13:06:15 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-23 13:06:15 +0000 |
commit | ac56145eb0c5bd233297be2542bfe6a165e5175b (patch) | |
tree | f5bc7d13f1ad629c2d8bb9bd1ee88731b5870de1 /gcc/emit-rtl.c | |
parent | bbdb51dab528e036011e8a91eb9b4475975341a3 (diff) | |
download | gcc-ac56145eb0c5bd233297be2542bfe6a165e5175b.tar.gz |
PR target/36533
* emit-rtl.c (set_reg_attrs_from_value): Do nothing if
REG is a hard register.
* gcc.target/i386/pr36533.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137038 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index d6929cf154b..fa2b78a4d95 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -963,6 +963,12 @@ set_reg_attrs_from_value (rtx reg, rtx x) { int offset; + /* Hard registers can be reused for multiple purposes within the same + function, so setting REG_ATTRS, REG_POINTER and REG_POINTER_ALIGN + on them is wrong. */ + if (HARD_REGISTER_P (reg)) + return; + offset = byte_lowpart_offset (GET_MODE (reg), GET_MODE (x)); if (MEM_P (x)) { |