diff options
author | Richard Stallman <rms@gnu.org> | 1992-11-25 18:04:15 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-11-25 18:04:15 +0000 |
commit | abd418d31ff128278eefebb5bdfa39aba68b42c4 (patch) | |
tree | 216feb6fbcaabc29da41aceaf3e3a617063263d7 /gcc/optabs.c | |
parent | 2ad701bad01f7a0a6ba0ace0c0c33fcacd835d30 (diff) | |
download | gcc-abd418d31ff128278eefebb5bdfa39aba68b42c4.zip gcc-abd418d31ff128278eefebb5bdfa39aba68b42c4.tar.gz gcc-abd418d31ff128278eefebb5bdfa39aba68b42c4.tar.bz2 |
(expand_binop, expand_twoval_binop): If we are going to fail, remove any load from MEM we did due to -fforce-mem...
(expand_binop, expand_twoval_binop): If we are going
to fail, remove any load from MEM we did due to -fforce-mem;
if the MEM was volatile, this will cause an extra load.
(expand_complex_abs): Likewise.
Correct use of variable LAST so it doesn't include the load
from MEM (to fix unrelated bug).
From-SVN: r2797
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 51ce710..1dd2e26 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -280,6 +280,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) || binoptab->code == LSHIFTRT || binoptab->code == ROTATE || binoptab->code == ROTATERT); + rtx entry_last = get_last_insn (); rtx last; class = GET_MODE_CLASS (mode); @@ -1093,7 +1094,11 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) if (! (methods == OPTAB_WIDEN || methods == OPTAB_LIB_WIDEN || methods == OPTAB_MUST_WIDEN)) - return 0; /* Caller says, don't even try. */ + { + /* Caller says, don't even try. */ + delete_insns_since (entry_last); + return 0; + } /* Compute the value of METHODS to pass to recursive calls. Don't allow widening to be tried recursively. */ @@ -1172,6 +1177,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) } } + delete_insns_since (entry_last); return 0; } @@ -1254,6 +1260,7 @@ expand_twoval_binop (binoptab, op0, op1, targ0, targ1, unsignedp) enum machine_mode mode = GET_MODE (targ0 ? targ0 : targ1); enum mode_class class; enum machine_mode wider_mode; + rtx entry_last = get_last_insn (); rtx last; class = GET_MODE_CLASS (mode); @@ -1358,6 +1365,7 @@ expand_twoval_binop (binoptab, op0, op1, targ0, targ1, unsignedp) } } + delete_insns_since (entry_last); return 0; } @@ -1651,7 +1659,8 @@ expand_complex_abs (mode, op0, target, unsignedp) enum mode_class class = GET_MODE_CLASS (mode); enum machine_mode wider_mode; register rtx temp; - rtx last = get_last_insn (); + rtx entry_last = get_last_insn (); + rtx last; rtx pat; /* Find the correct mode for the real and imaginary parts. */ @@ -1670,6 +1679,8 @@ expand_complex_abs (mode, op0, target, unsignedp) op0 = force_not_mem (op0); } + last = get_last_insn (); + if (target) target = protect_from_queue (target, 1); @@ -1819,6 +1830,7 @@ expand_complex_abs (mode, op0, target, unsignedp) } } + delete_insns_since (entry_last); return 0; } |