public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] i386: Force V2SI mode operands to registers in expand_sse_movcc
@ 2021-05-10 14:45 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2021-05-10 14:45 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

For some reason middle-end does not enforce operand
predicates for vcond patterns.

2021-05-10  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
    * config/i386/i386-expand.c (ix86_expand_sse_movcc)
    <case E_V2SImode>: Force op_true to register.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Pushed to master.

Uros.

[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 459 bytes --]

diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c
index e9f11bca78a..5cfde5b3d30 100644
--- a/gcc/config/i386/i386-expand.c
+++ b/gcc/config/i386/i386-expand.c
@@ -3707,6 +3707,8 @@ ix86_expand_sse_movcc (rtx dest, rtx cmp, rtx op_true, rtx op_false)
     case E_V2SImode:
       if (TARGET_SSE4_1)
 	{
+	  op_true = force_reg (mode, op_true);
+
 	  gen = gen_mmx_pblendvb;
 	  if (mode != V8QImode)
 	    d = gen_reg_rtx (V8QImode);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-10 14:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 14:45 [PATCH] i386: Force V2SI mode operands to registers in expand_sse_movcc 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).