LoongArch: Fix clerical errors in lasx_xvreplgr2vr_* and lsx_vreplgr2vr_*.

Message ID 20241102073718.10333-1-chenglulu@loongson.cn
State Committed
Commit f0cb64fb3f9d8e6f765007d4d62f1f5df73dc498
Headers
Series LoongArch: Fix clerical errors in lasx_xvreplgr2vr_* and lsx_vreplgr2vr_*. |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Test passed

Commit Message

Lulu Cheng Nov. 2, 2024, 7:37 a.m. UTC
  [x]vldi.{b/h/w/d} is not implemented in LoongArch.
Use the macro [x]vrepli.{b/h/w/d} to replace.

gcc/ChangeLog:

	* config/loongarch/lasx.md: Fixed.
	* config/loongarch/lsx.md: Fixed.
---
 gcc/config/loongarch/lasx.md | 2 +-
 gcc/config/loongarch/lsx.md  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Lulu Cheng Nov. 22, 2024, 2:07 a.m. UTC | #1
Pushed to r15-5581 and r14-10961.

在 2024/11/2 下午3:37, Lulu Cheng 写道:
> [x]vldi.{b/h/w/d} is not implemented in LoongArch.
> Use the macro [x]vrepli.{b/h/w/d} to replace.
>
> gcc/ChangeLog:
>
> 	* config/loongarch/lasx.md: Fixed.
> 	* config/loongarch/lsx.md: Fixed.
> ---
>   gcc/config/loongarch/lasx.md | 2 +-
>   gcc/config/loongarch/lsx.md  | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/config/loongarch/lasx.md b/gcc/config/loongarch/lasx.md
> index d37b2e83c21..457ed163f31 100644
> --- a/gcc/config/loongarch/lasx.md
> +++ b/gcc/config/loongarch/lasx.md
> @@ -1402,7 +1402,7 @@ (define_insn "lasx_xvreplgr2vr_<lasxfmt_f>"
>     "ISA_HAS_LASX"
>   {
>     if (which_alternative == 1)
> -    return "xvldi.b\t%u0,0" ;
> +    return "xvrepli.b\t%u0,0";
>   
>     return "xvreplgr2vr.<lasxfmt>\t%u0,%z1";
>   }
> diff --git a/gcc/config/loongarch/lsx.md b/gcc/config/loongarch/lsx.md
> index fcba28b0751..a9004290371 100644
> --- a/gcc/config/loongarch/lsx.md
> +++ b/gcc/config/loongarch/lsx.md
> @@ -1275,7 +1275,7 @@ (define_insn "lsx_vreplgr2vr_<lsxfmt_f>"
>     "ISA_HAS_LSX"
>   {
>     if (which_alternative == 1)
> -    return "vldi.<lsxfmt>\t%w0,0";
> +    return "vrepli.b\t%w0,0";
>   
>     return "vreplgr2vr.<lsxfmt>\t%w0,%z1";
>   }
  

Patch

diff --git a/gcc/config/loongarch/lasx.md b/gcc/config/loongarch/lasx.md
index d37b2e83c21..457ed163f31 100644
--- a/gcc/config/loongarch/lasx.md
+++ b/gcc/config/loongarch/lasx.md
@@ -1402,7 +1402,7 @@  (define_insn "lasx_xvreplgr2vr_<lasxfmt_f>"
   "ISA_HAS_LASX"
 {
   if (which_alternative == 1)
-    return "xvldi.b\t%u0,0" ;
+    return "xvrepli.b\t%u0,0";
 
   return "xvreplgr2vr.<lasxfmt>\t%u0,%z1";
 }
diff --git a/gcc/config/loongarch/lsx.md b/gcc/config/loongarch/lsx.md
index fcba28b0751..a9004290371 100644
--- a/gcc/config/loongarch/lsx.md
+++ b/gcc/config/loongarch/lsx.md
@@ -1275,7 +1275,7 @@  (define_insn "lsx_vreplgr2vr_<lsxfmt_f>"
   "ISA_HAS_LSX"
 {
   if (which_alternative == 1)
-    return "vldi.<lsxfmt>\t%w0,0";
+    return "vrepli.b\t%w0,0";
 
   return "vreplgr2vr.<lsxfmt>\t%w0,%z1";
 }