aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaochen Jiang <haochen.jiang@intel.com>2024-07-26 16:49:08 +0800
committerThomas Koenig <tkoenig@gcc.gnu.org>2024-07-28 19:05:59 +0200
commit5a585d47ebe07180afae0c054a0580b78a78984e (patch)
tree1b57fcf4962ba208d6ed4060a1efc4f097bb8a39
parent7a88eb35ef4834fcd98408fe5505360fead99f43 (diff)
downloadgcc-5a585d47ebe07180afae0c054a0580b78a78984e.zip
gcc-5a585d47ebe07180afae0c054a0580b78a78984e.tar.gz
gcc-5a585d47ebe07180afae0c054a0580b78a78984e.tar.bz2
i386: Use BLKmode for {ld,st}tilecfg
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.
-rw-r--r--gcc/config/i386/i386-expand.cc2
-rw-r--r--gcc/config/i386/i386.md12
2 files changed, 6 insertions, 8 deletions
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
index 9a31e6d..d9ad062 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -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
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 6207036..fb10fdc 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -29032,24 +29032,22 @@
(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")