public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Remove redudant iptr when operand already has a scalar mode.
@ 2019-10-26 14:06 Hongtao Liu
  2019-10-26 18:16 ` Uros Bizjak
  2019-10-28 22:06 ` [PATCH] Unbreak -masm=intel (PR target/92258) Jakub Jelinek
  0 siblings, 2 replies; 4+ messages in thread
From: Hongtao Liu @ 2019-10-26 14:06 UTC (permalink / raw)
  To: Uros Bizjak, GCC Patches

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

> BTW: Please also note that there is no need to use <iptr> or operand
> mode override in scalar insn templates for intel asm dialect when
> operand already has a scalar mode.
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01868.html

This patch is to remove redundant <iptr> when operand already has a scalar mode.

bootstrap and regression test for i386/x86-64 is ok.

Changelog
gcc/
        * config/i386/sse.md (*<sse>_vm<plusminus_insn><mode>3,
        <sse>_vm<multdiv_mnemonic><mode>3): Remove <iptr> since
        operand is already scalar mode.
        (iptr): Remove SF/DF.
-- 
BR,
Hongtao

[-- Attachment #2: 0001-Remove-redudant-iptr-when-operand-is-already-scalar-.patch --]
[-- Type: application/octet-stream, Size: 1851 bytes --]

From 4620daa9aa11d67b6aca90d38234c5ce71c6f917 Mon Sep 17 00:00:00 2001
From: liuhongt <hongtao.liu@intel.com>
Date: Sat, 26 Oct 2019 10:54:54 +0800
Subject: [PATCH] Remove redudant <iptr> when operand is already scalar mode.

gcc/
	* config/i386/sse.md (*<sse>_vm<plusminus_insn><mode>3,
	<sse>_vm<multdiv_mnemonic><mode>3): Remove <iptr> since
	operand is already scalar mode.
	(iptr): Remove SF/DF.
---
 gcc/config/i386/sse.md | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 403e91d4b17..231b8cf6e67 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -850,8 +850,7 @@
    (V16QI "b") (V8HI "w") (V4SI "k") (V2DI "q")
    (V16SF "k") (V8DF "q")
    (V8SF "k") (V4DF "q")
-   (V4SF "k") (V2DF "q")
-   (SF "k") (DF "q")])
+   (V4SF "k") (V2DF "q")])
 
 ;; Mapping of vector modes to VPTERNLOG suffix
 (define_mode_attr ternlogsuffix
@@ -1851,8 +1850,8 @@
 	  (const_int 1)))]
   "TARGET_SSE"
   "@
-   <plusminus_mnemonic><ssescalarmodesuffix>\t{%2, %0|%0, %<iptr>2}
-   v<plusminus_mnemonic><ssescalarmodesuffix>\t{%2, %1, %0|%0, %1, %<iptr>2}"
+   <plusminus_mnemonic><ssescalarmodesuffix>\t{%2, %0|%0, %2}
+   v<plusminus_mnemonic><ssescalarmodesuffix>\t{%2, %1, %0|%0, %1, %2}"
   [(set_attr "isa" "noavx,avx")
    (set_attr "type" "sseadd")
    (set_attr "prefix" "orig,vex")
@@ -1927,8 +1926,8 @@
 	  (const_int 1)))]
   "TARGET_SSE"
   "@
-   <multdiv_mnemonic><ssescalarmodesuffix>\t{%2, %0|%0, %<iptr>2}
-   v<multdiv_mnemonic><ssescalarmodesuffix>\t{%2, %1, %0|%0, %1, %<iptr>2}"
+   <multdiv_mnemonic><ssescalarmodesuffix>\t{%2, %0|%0, %2}
+   v<multdiv_mnemonic><ssescalarmodesuffix>\t{%2, %1, %0|%0, %1, %2}"
   [(set_attr "isa" "noavx,avx")
    (set_attr "type" "sse<multdiv_mnemonic>")
    (set_attr "prefix" "orig,vex")
-- 
2.19.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-28 22:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-26 14:06 [PATCH] Remove redudant iptr when operand already has a scalar mode Hongtao Liu
2019-10-26 18:16 ` Uros Bizjak
2019-10-28 22:06 ` [PATCH] Unbreak -masm=intel (PR target/92258) Jakub Jelinek
2019-10-28 22:08   ` 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).