* [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode>
@ 2023-10-22 22:46 Juzhe-Zhong
2023-10-23 2:24 ` Jeff Law
0 siblings, 1 reply; 4+ messages in thread
From: Juzhe-Zhong @ 2023-10-22 22:46 UTC (permalink / raw)
To: gcc-patches; +Cc: kito.cheng, kito.cheng, jeffreyalaw, rdapp.gcc, Juzhe-Zhong
The tuple mode mov<mode> pattern doesn't have avl_type so it is invalid attribute.
gcc/ChangeLog:
* config/riscv/vector.md: Fix avl_type attribute of tuple mov<mode>.
---
gcc/config/riscv/vector.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/config/riscv/vector.md b/gcc/config/riscv/vector.md
index 32955fb8cf0..ef91950178f 100644
--- a/gcc/config/riscv/vector.md
+++ b/gcc/config/riscv/vector.md
@@ -1208,7 +1208,8 @@
DONE;
}
[(set_attr "type" "vmov,vlde,vste")
- (set_attr "mode" "<VT:MODE>")])
+ (set_attr "mode" "<VT:MODE>")
+ (set (attr "avl_type") (const_int INVALID_ATTRIBUTE))])
;; -----------------------------------------------------------------
;; ---- VLS Moves Operations
--
2.36.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode>
2023-10-22 22:46 [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode> Juzhe-Zhong
@ 2023-10-23 2:24 ` Jeff Law
2023-10-23 2:26 ` Li, Pan2
2023-10-23 2:32 ` juzhe.zhong
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Law @ 2023-10-23 2:24 UTC (permalink / raw)
To: Juzhe-Zhong, gcc-patches; +Cc: kito.cheng, kito.cheng, rdapp.gcc
On 10/22/23 16:46, Juzhe-Zhong wrote:
> The tuple mode mov<mode> pattern doesn't have avl_type so it is invalid attribute.
>
> gcc/ChangeLog:
>
> * config/riscv/vector.md: Fix avl_type attribute of tuple mov<mode>.
Presumably you got a fault or something similar trying to compute the
avl_type attr when trying to access operands[7]? from this code:
> (eq_attr "type" "vlde,vldff,vste,vimov,vimov,vimov,vfmov,vext,vimerge,\
> vfsqrt,vfrecp,vfmerge,vfcvtitof,vfcvtftoi,vfwcvtitof,\
> vfwcvtftoi,vfwcvtftof,vfncvtitof,vfncvtftoi,vfncvtftof,\
> vfclass,vired,viwred,vfredu,vfredo,vfwredu,vfwredo,\
> vimovxv,vfmovfv,vlsegde,vlsegdff")
> (symbol_ref "INTVAL (operands[7])")
> (eq_attr "type" "vldm,vstm,vimov,vmalu,vmalu")
OK for the trunk.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode>
2023-10-23 2:24 ` Jeff Law
@ 2023-10-23 2:26 ` Li, Pan2
2023-10-23 2:32 ` juzhe.zhong
1 sibling, 0 replies; 4+ messages in thread
From: Li, Pan2 @ 2023-10-23 2:26 UTC (permalink / raw)
To: Jeff Law, Juzhe-Zhong, gcc-patches; +Cc: kito.cheng, kito.cheng, rdapp.gcc
Committed, thanks Jeff.
Pan
-----Original Message-----
From: Jeff Law <jeffreyalaw@gmail.com>
Sent: Monday, October 23, 2023 10:24 AM
To: Juzhe-Zhong <juzhe.zhong@rivai.ai>; gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com; kito.cheng@sifive.com; rdapp.gcc@gmail.com
Subject: Re: [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode>
On 10/22/23 16:46, Juzhe-Zhong wrote:
> The tuple mode mov<mode> pattern doesn't have avl_type so it is invalid attribute.
>
> gcc/ChangeLog:
>
> * config/riscv/vector.md: Fix avl_type attribute of tuple mov<mode>.
Presumably you got a fault or something similar trying to compute the
avl_type attr when trying to access operands[7]? from this code:
> (eq_attr "type" "vlde,vldff,vste,vimov,vimov,vimov,vfmov,vext,vimerge,\
> vfsqrt,vfrecp,vfmerge,vfcvtitof,vfcvtftoi,vfwcvtitof,\
> vfwcvtftoi,vfwcvtftof,vfncvtitof,vfncvtftoi,vfncvtftof,\
> vfclass,vired,viwred,vfredu,vfredo,vfwredu,vfwredo,\
> vimovxv,vfmovfv,vlsegde,vlsegdff")
> (symbol_ref "INTVAL (operands[7])")
> (eq_attr "type" "vldm,vstm,vimov,vmalu,vmalu")
OK for the trunk.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode>
2023-10-23 2:24 ` Jeff Law
2023-10-23 2:26 ` Li, Pan2
@ 2023-10-23 2:32 ` juzhe.zhong
1 sibling, 0 replies; 4+ messages in thread
From: juzhe.zhong @ 2023-10-23 2:32 UTC (permalink / raw)
To: jeffreyalaw, gcc-patches; +Cc: kito.cheng, Kito.cheng, Robin Dapp
[-- Attachment #1: Type: text/plain, Size: 1907 bytes --]
Hi, Jeff.
(define_insn_and_split "*mov<VT:mode>_<P:mode>"
[(set (match_operand:VT 0 "reg_or_mem_operand" "=vr,vr, m")
(match_operand:VT 1 "reg_or_mem_operand" " vr, m,vr"))
(clobber (match_scratch:P 2 "=X,&r,&r"))
(clobber (match_scratch:P 3 "=X,&r,&r"))
(clobber (match_scratch:P 4 "=X,&r,&r"))]
"TARGET_VECTOR"
"#"
"&& reload_completed"
[(const_int 0)]
{
riscv_vector::expand_tuple_move (operands);
DONE;
}
[(set_attr "type" "vmov,vlde,vste")
(set_attr "mode" "<VT:MODE>")
(set (attr "avl_type") (const_int INVALID_ATTRIBUTE))])
We classify this pattern as vlde/vste/vmov, this pattern doesn't have AVL TYPE operands.
I realize that when I am adding new pre-RA optimization PASS it caused issue.
juzhe.zhong@rivai.ai
From: Jeff Law
Date: 2023-10-23 10:24
To: Juzhe-Zhong; gcc-patches
CC: kito.cheng; kito.cheng; rdapp.gcc
Subject: Re: [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode>
On 10/22/23 16:46, Juzhe-Zhong wrote:
> The tuple mode mov<mode> pattern doesn't have avl_type so it is invalid attribute.
>
> gcc/ChangeLog:
>
> * config/riscv/vector.md: Fix avl_type attribute of tuple mov<mode>.
Presumably you got a fault or something similar trying to compute the
avl_type attr when trying to access operands[7]? from this code:
> (eq_attr "type" "vlde,vldff,vste,vimov,vimov,vimov,vfmov,vext,vimerge,\
> vfsqrt,vfrecp,vfmerge,vfcvtitof,vfcvtftoi,vfwcvtitof,\
> vfwcvtftoi,vfwcvtftof,vfncvtitof,vfncvtftoi,vfncvtftof,\
> vfclass,vired,viwred,vfredu,vfredo,vfwredu,vfwredo,\
> vimovxv,vfmovfv,vlsegde,vlsegdff")
> (symbol_ref "INTVAL (operands[7])")
> (eq_attr "type" "vldm,vstm,vimov,vmalu,vmalu")
OK for the trunk.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-23 2:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-22 22:46 [PATCH] RISC-V: Fix AVL_TYPE attribute of tuple mode mov<mode> Juzhe-Zhong
2023-10-23 2:24 ` Jeff Law
2023-10-23 2:26 ` Li, Pan2
2023-10-23 2:32 ` juzhe.zhong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).