]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Use BLKmode for {ld,st}tilecfg
authorHaochen Jiang <haochen.jiang@intel.com>
Fri, 26 Jul 2024 08:49:08 +0000 (16:49 +0800)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 28 Jul 2024 17:05:59 +0000 (19:05 +0200)
Hi all,

For AMX instructions related with memory, we will treat the memory
size as not specified since there won't be different size causing
confusion for memory.

This will change the output under Intel mode, which is broken for now when
using with assembler and aligns to current binutils behavior.

Bootstrapped and regtested on x86-64-pc-linux-gnu. Ok for trunk?

Thx,
Haochen

gcc/ChangeLog:

* config/i386/i386-expand.cc (ix86_expand_builtin): Change
from XImode to BLKmode.
* config/i386/i386.md (ldtilecfg): Change XI to BLK.
(sttilecfg): Ditto.

gcc/config/i386/i386-expand.cc
gcc/config/i386/i386.md

index 9a31e6df2aa263e0ac44718d6efcbed6e8c54aa6..d9ad06264aaf5aedc7f1edb40efda6ef99225bed 100644 (file)
@@ -14198,7 +14198,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
          op0 = convert_memory_address (Pmode, op0);
          op0 = copy_addr_to_reg (op0);
        }
-      op0 = gen_rtx_MEM (XImode, op0);
+      op0 = gen_rtx_MEM (BLKmode, op0);
       if (fcode == IX86_BUILTIN_LDTILECFG)
        icode = CODE_FOR_ldtilecfg;
       else
index 6207036a2a01d650ddc9e01a953fc46b966206aa..fb10fdc9f96d9acb370100d60b7843968daa2762 100644 (file)
    (set_attr "type" "other")])
 
 (define_insn "ldtilecfg"
-  [(unspec_volatile [(match_operand:XI 0 "memory_operand" "m")]
+  [(unspec_volatile [(match_operand:BLK 0 "memory_operand" "m")]
             UNSPECV_LDTILECFG)]
   "TARGET_AMX_TILE"
   "ldtilecfg\t%0"
   [(set_attr "type" "other")
    (set_attr "prefix" "maybe_evex")
-   (set_attr "memory" "load")
-   (set_attr "mode" "XI")])
+   (set_attr "memory" "load")])
 
 (define_insn "sttilecfg"
-  [(set (match_operand:XI 0 "memory_operand" "=m")
-        (unspec_volatile:XI [(const_int 0)] UNSPECV_STTILECFG))]
+  [(set (match_operand:BLK 0 "memory_operand" "=m")
+        (unspec_volatile:BLK [(const_int 0)] UNSPECV_STTILECFG))]
   "TARGET_AMX_TILE"
   "sttilecfg\t%0"
   [(set_attr "type" "other")
    (set_attr "prefix" "maybe_evex")
-   (set_attr "memory" "store")
-   (set_attr "mode" "XI")])
+   (set_attr "memory" "store")])
 
 (include "mmx.md")
 (include "sse.md")