diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2007-09-04 12:07:19 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2007-09-04 12:07:19 +0200 |
commit | 95afbcac54236d4704a84d2c0fff4dd63005d30c (patch) | |
tree | 5e385c13788bef59e16a57f49b74a6ac9b4571b1 /gcc/combine.c | |
parent | 731c68a204929a5d970026b9b400ff73b3f1bda0 (diff) | |
download | gcc-95afbcac54236d4704a84d2c0fff4dd63005d30c.zip gcc-95afbcac54236d4704a84d2c0fff4dd63005d30c.tar.gz gcc-95afbcac54236d4704a84d2c0fff4dd63005d30c.tar.bz2 |
re PR middle-end/33187 (Missed cmove opportunity)
PR middle-end/33187
* combine.c (subst): Do not try to simplify X if it represents load
of FP constant from the constant pool via float extension.
testsuite/ChangeLog:
PR middle-end/33187
* gcc.target/i386/cmov7.c: New file.
From-SVN: r128072
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index c794e11..b2bc780 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -4478,6 +4478,18 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy) } } + /* Check if we are loading something from the constant pool via float + extension; in this case we would undo compress_float_constant + optimization and degenerate constant load to an immediate value. */ + if (GET_CODE (x) == FLOAT_EXTEND + && MEM_P (XEXP (x, 0)) + && MEM_READONLY_P (XEXP (x, 0))) + { + rtx tmp = avoid_constant_pool_reference (x); + if (x != tmp) + return x; + } + /* Try to simplify X. If the simplification changed the code, it is likely that further simplification will help, so loop, but limit the number of repetitions that will be performed. */ |