diff options
author | Mark Shinwell <shinwell@codesourcery.com> | 2007-10-08 15:28:56 +0000 |
---|---|---|
committer | Mark Shinwell <shinwell@gcc.gnu.org> | 2007-10-08 15:28:56 +0000 |
commit | b4d4a7d4b09fe843af40348786bdaae7dac4281e (patch) | |
tree | 241c0b28f58afd35e1c47290cd6bc1891754036a /gcc/combine.c | |
parent | bd113227bf7da8dfe45b9f5db511dadc9b22cb00 (diff) | |
download | gcc-b4d4a7d4b09fe843af40348786bdaae7dac4281e.zip gcc-b4d4a7d4b09fe843af40348786bdaae7dac4281e.tar.gz gcc-b4d4a7d4b09fe843af40348786bdaae7dac4281e.tar.bz2 |
combine.c (setup_incoming_promotions): Ensure that arguments that have not undergone mode promotions do not...
gcc/
* combine.c (setup_incoming_promotions): Ensure that
arguments that have not undergone mode promotions do not
incorrectly get marked as being sign- or zero-extended.
From-SVN: r129131
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 392dedb..ca378bd 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1363,15 +1363,17 @@ setup_incoming_promotions (rtx first) /* Eliminate sign extensions in the callee when possible. Only do this when: - (a) the mode of the register is the same as the mode of + (a) a mode promotion has occurred; + (b) the mode of the register is the same as the mode of the argument as it is passed; and - (b) the signedness does not change across any of the promotions; and - (c) when no language-level promotions (which we cannot guarantee + (c) the signedness does not change across any of the promotions; and + (d) when no language-level promotions (which we cannot guarantee will have been done by an external caller) are necessary, unless we know that this function is only ever called from the current compilation unit -- all of whose call sites will do the mode1 --> mode2 promotion. */ - if (mode3 == mode4 + if (mode1 != mode3 + && mode3 == mode4 && uns1 == uns3 && (mode1 == mode2 || strictly_local)) { |