]> gcc.gnu.org Git - gcc.git/commitdiff
LoongArch: Modify check_effective_target_vect_int_mod according to SX/ASX capabilities.
authorChenghui Pan <panchenghui@loongson.cn>
Tue, 26 Sep 2023 06:42:57 +0000 (14:42 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Thu, 12 Oct 2023 07:27:29 +0000 (15:27 +0800)
gcc/testsuite/ChangeLog:

* lib/target-supports.exp: Add LoongArch in
check_effective_target_vect_int_mod according to SX/ASX capabilities.

gcc/testsuite/lib/target-supports.exp

index 4451386d78089087ae9b6000f3badebd49372ea5..f0b692a2e19bae3cf3ffee8f27bd39b05aba3b9c 100644 (file)
@@ -8816,6 +8816,8 @@ proc check_effective_target_vect_int_mod { } {
       expr { ([istarget powerpc*-*-*]
              && [check_effective_target_has_arch_pwr10])
              || [istarget amdgcn-*-*]
+             || ([istarget loongarch*-*-*]
+                && [check_effective_target_loongarch_sx])
              || ([istarget riscv*-*-*]
                 && [check_effective_target_riscv_v]) }}]
 }
@@ -12948,6 +12950,14 @@ proc check_effective_target_cv_alu { } {
     } "-march=rv32i_xcvalu" ]
 }
 
+proc check_effective_target_loongarch_sx { } {
+    return [check_no_compiler_messages loongarch_lsx assembly {
+       #if !defined(__loongarch_sx)
+       #error "LSX not defined"
+       #endif
+    }]
+}
+
 proc check_effective_target_loongarch_sx_hw { } {
     return [check_runtime loongarch_sx_hw {
        #include <lsxintrin.h>
@@ -12960,6 +12970,14 @@ proc check_effective_target_loongarch_sx_hw { } {
     } "-mlsx"]
 }
 
+proc check_effective_target_loongarch_asx { } {
+    return [check_no_compiler_messages loongarch_asx assembly {
+       #if !defined(__loongarch_asx)
+       #error "LASX not defined"
+       #endif
+    }]
+}
+
 proc check_effective_target_loongarch_asx_hw { } {
     return [check_runtime loongarch_asx_hw {
        #include <lasxintrin.h>
This page took 0.073098 seconds and 5 git commands to generate.