aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaochen Jiang <haochen.jiang@intel.com>2024-07-26 16:49:08 +0800
committerHaochen Jiang <haochen.jiang@intel.com>2024-07-26 16:49:08 +0800
commitf145f5411609dca5493a6709e8139609b584622f (patch)
tree5df090f15d640dc8b0a226a9932fd177958221e5
parentfd599d96d464caed8bf78e4a43120d9a121b7e7a (diff)
downloadgcc-f145f5411609dca5493a6709e8139609b584622f.zip
gcc-f145f5411609dca5493a6709e8139609b584622f.tar.gz
gcc-f145f5411609dca5493a6709e8139609b584622f.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")