* [PATCH, i386]: Ignore the cost of embedded comparison (PR 65871)
@ 2015-06-22 9:49 Uros Bizjak
0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2015-06-22 9:49 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
Hello!
As shown in the PR [1], RTX costs can reject combination of the
operation and its embedded comparison. Attached patch fixes this by
ignoring the cost of embedded comparison.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65871#c10
2015-06-22 Uros Bizjak <ubizjak@gmail.com>
PR target/65871
* config/i386/i386.c (ix86_rtx_costs) <case COMPARE>: Ignore the
cost of embedded comparison.
Bootstrapped on x86_64-linux-gnu, regtest in progress.
Uros.
[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 559 bytes --]
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 224718)
+++ config/i386/i386.c (working copy)
@@ -42531,6 +42531,12 @@ ix86_rtx_costs (rtx x, int code_i, int outer_code_
+ rtx_cost (const1_rtx, outer_code, opno, speed));
return true;
}
+
+ /* The embedded comparison operand is completely free. */
+ if (!general_operand (XEXP (x, 0), GET_MODE (XEXP (x, 0)))
+ && XEXP (x, 1) == const0_rtx)
+ *total = 0;
+
return false;
case FLOAT_EXTEND:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-22 8:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22 9:49 [PATCH, i386]: Ignore the cost of embedded comparison (PR 65871) Uros Bizjak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).