From f145f5411609dca5493a6709e8139609b584622f Mon Sep 17 00:00:00 2001 From: Haochen Jiang Date: Fri, 26 Jul 2024 16:49:08 +0800 Subject: 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. --- gcc/config/i386/i386-expand.cc | 2 +- gcc/config/i386/i386.md | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'gcc') 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") -- cgit v1.1