i386: Emulate MMX movntq with SSE2 movntidi
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 15 May 2019 15:21:04 +0000 (15:21 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 15 May 2019 15:21:04 +0000 (08:21 -0700)
Emulate MMX movntq with SSE2 movntidi.  Only register source operand is
allowed.

PR target/89021
* config/i386/mmx.md (sse_movntq): Add SSE2 emulation.

From-SVN: r271238

gcc/ChangeLog
gcc/config/i386/mmx.md

index 84cf0aabff1f0985dd4e63c7f4bd38bc488b0a72..01cdde4faf2c9daa2f19d94d7e100d5331e6b70c 100644 (file)
@@ -1,3 +1,8 @@
+2019-05-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/89021
+       * config/i386/mmx.md (sse_movntq): Add SSE2 emulation.
+
 2019-05-15  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/89021
index 15fd355eeb2a1589d328a9ed8157ada23d3dfeb6..6cc9547d2668a904f834b5aacfe84a4ee38d0128 100644 (file)
 })
 
 (define_insn "sse_movntq"
-  [(set (match_operand:DI 0 "memory_operand" "=m")
-       (unspec:DI [(match_operand:DI 1 "register_operand" "y")]
+  [(set (match_operand:DI 0 "memory_operand" "=m,m")
+       (unspec:DI [(match_operand:DI 1 "register_operand" "y,r")]
                   UNSPEC_MOVNTQ))]
-  "TARGET_SSE || TARGET_3DNOW_A"
-  "movntq\t{%1, %0|%0, %1}"
-  [(set_attr "type" "mmxmov")
+  "(TARGET_MMX || TARGET_MMX_WITH_SSE)
+   && (TARGET_SSE || TARGET_3DNOW_A)"
+  "@
+   movntq\t{%1, %0|%0, %1}
+   movnti\t{%1, %0|%0, %1}"
+  [(set_attr "mmx_isa" "native,x64")
+   (set_attr "type" "mmxmov,ssemov")
    (set_attr "mode" "DI")])
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;