aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2007-09-04 12:07:19 +0200
committerUros Bizjak <uros@gcc.gnu.org>2007-09-04 12:07:19 +0200
commit95afbcac54236d4704a84d2c0fff4dd63005d30c (patch)
tree5e385c13788bef59e16a57f49b74a6ac9b4571b1 /gcc/combine.c
parent731c68a204929a5d970026b9b400ff73b3f1bda0 (diff)
downloadgcc-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.c12
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. */