* [PATCH, i386]: Allow memory operand for BT with immediate bitcount operand
@ 2017-09-03 18:53 Uros Bizjak
0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2017-09-03 18:53 UTC (permalink / raw)
To: gcc-patches
Hello!
The BT instruction is slow only when memory operand is used with
nonimmediate bitcount operand.
2017-09-03 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
predicate for operand 1. Add (m,<S>) constraint.
(*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
Prevent memory operand 1 with register operand 2.
Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
Committed to mainline SVN.
Uros.
Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md (revision 251566)
+++ config/i386/i386.md (working copy)
@@ -11217,9 +11217,9 @@
[(set (reg:CCC FLAGS_REG)
(compare:CCC
(zero_extract:SWI48
- (match_operand:SWI48 0 "register_operand" "r")
+ (match_operand:SWI48 0 "nonimmediate_operand" "r,m")
(const_int 1)
- (match_operand:SI 1 "nonmemory_operand" "r<S>"))
+ (match_operand:SI 1 "nonmemory_operand" "r<S>,<S>"))
(const_int 0)))]
""
{
@@ -11248,7 +11248,7 @@
[(set (pc)
(if_then_else (match_operator 0 "bt_comparison_operator"
[(zero_extract:SWI48
- (match_operand:SWI48 1 "register_operand")
+ (match_operand:SWI48 1 "nonimmediate_operand")
(const_int 1)
(match_operand:SI 2 "nonmemory_operand"))
(const_int 0)])
@@ -11260,7 +11260,7 @@
? (INTVAL (operands[2]) < GET_MODE_BITSIZE (<MODE>mode)
&& INTVAL (operands[2])
>= (optimize_function_for_size_p (cfun) ? 8 : 32))
- : register_operand (operands[2], SImode))
+ : !memory_operand (operands[1], <MODE>mode))
&& can_create_pseudo_p ()"
"#"
"&& 1"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-09-03 18:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-03 18:53 [PATCH, i386]: Allow memory operand for BT with immediate bitcount operand 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).