@@ -4087,7 +4087,8 @@ proc check_effective_target_vect_int { } {
4087
4087
|| [is-effective-target arm_neon]
4088
4088
|| ([istarget mips*-*-*]
4089
4089
&& ([et-is-effective-target mips_loongson_mmi]
4090
- || [et-is-effective-target mips_msa]))
4090
+ || [et-is-effective-target mips_msa]))
4091
+ || ([istarget arc64-*-])
4091
4092
|| ([istarget s390*-*-*]
4092
4093
&& [check_effective_target_s390_vx])
4093
4094
|| ([istarget riscv*-*-*]
@@ -4156,6 +4157,7 @@ proc check_effective_target_vect_complex_add_byte { } {
4156
4157
&& [check_effective_target_aarch64_little_endian])
4157
4158
|| ([check_effective_target_arm_v8_1m_mve_fp_ok]
4158
4159
&& [check_effective_target_arm_little_endian])
4160
+ || ([istarget arc64-*-*])
4159
4161
}}]
4160
4162
}
4161
4163
@@ -4171,6 +4173,7 @@ proc check_effective_target_vect_complex_add_short { } {
4171
4173
&& [check_effective_target_aarch64_little_endian])
4172
4174
|| ([check_effective_target_arm_v8_1m_mve_fp_ok]
4173
4175
&& [check_effective_target_arm_little_endian])
4176
+ || ([istarget arc64-*-*])
4174
4177
}}]
4175
4178
}
4176
4179
@@ -4219,6 +4222,7 @@ proc check_effective_target_vect_complex_add_half { } {
4219
4222
&& [check_effective_target_aarch64_little_endian])
4220
4223
|| ([check_effective_target_arm_v8_1m_mve_fp_ok]
4221
4224
&& [check_effective_target_arm_little_endian])
4225
+ || ([check_effective_target_arc64_fp16_vfloat])
4222
4226
}}]
4223
4227
}
4224
4228
@@ -4237,6 +4241,7 @@ proc check_effective_target_vect_complex_add_float { } {
4237
4241
&& [check_effective_target_aarch64_little_endian])
4238
4242
|| ([check_effective_target_arm_v8_1m_mve_fp_ok]
4239
4243
&& [check_effective_target_arm_little_endian])
4244
+ || ([check_effective_target_arc64_fp32_vfloat])
4240
4245
}}]
4241
4246
}
4242
4247
@@ -4252,6 +4257,7 @@ proc check_effective_target_vect_complex_add_double { } {
4252
4257
&& [check_effective_target_aarch64_little_endian])
4253
4258
|| ([check_effective_target_aarch64_sve2]
4254
4259
&& [check_effective_target_aarch64_little_endian]))
4260
+ || ([check_effective_target_arc64_fp64_vfloat])
4255
4261
}}]
4256
4262
}
4257
4263
@@ -4544,6 +4550,40 @@ proc check_effective_target_arc64_atomic { } {
4544
4550
}]
4545
4551
}
4546
4552
4553
+ proc check_effective_target_arc64_fp16_vfloat { } {
4554
+ if { ![istarget arc64-*-*] } {
4555
+ return 0;
4556
+ }
4557
+ return [check_no_compiler_messages arc_fp16_vfloat assembly {
4558
+ #if !defined(__ARC_FPU_SP__)
4559
+ #error NO_16b_FLOATS
4560
+ #endif
4561
+ }]
4562
+ }
4563
+
4564
+ proc check_effective_target_arc64_fp32_vfloat { } {
4565
+ if { ![istarget arc64-*-*] } {
4566
+ return 0;
4567
+ }
4568
+ return [check_no_compiler_messages arc_fp32_vfloat assembly {
4569
+ #if !defined(__ARC_FPU_SP__)
4570
+ #error NO_32b_FLOATS
4571
+ #endif
4572
+ }]
4573
+ }
4574
+
4575
+ proc check_effective_target_arc64_fp64_vfloat { } {
4576
+ if { ![istarget arc64-*-*] } {
4577
+ return 0;
4578
+ }
4579
+ return [check_no_compiler_messages arc_fp64_vfloat assembly {
4580
+ #if !defined(__ARC_FPU_DP__) && !defined(__ARC64_WIDE_VECTOR)
4581
+ #error NO_64b_FLOATS
4582
+ #endif
4583
+ }]
4584
+ }
4585
+
4586
+
4547
4587
# Return 1 if this is an arm target using 32-bit instructions
4548
4588
proc check_effective_target_arm32 { } {
4549
4589
if { ![istarget arm*-*-*] } {
@@ -7767,6 +7807,7 @@ proc check_effective_target_vect_perm { } {
7767
7807
|| [et-is-effective-target mips_msa]))
7768
7808
|| ([istarget s390*-*-*]
7769
7809
&& [check_effective_target_s390_vx])
7810
+ || ([istarget arc64-*-*])
7770
7811
|| [istarget amdgcn-*-*]
7771
7812
|| ([istarget riscv*-*-*]
7772
7813
&& [check_effective_target_riscv_v])
@@ -11773,6 +11814,9 @@ proc check_vect_support_and_set_flags { } {
11773
11814
} else {
11774
11815
set dg-do-what-default compile
11775
11816
}
11817
+ } elseif [istarget arc64-*-*] {
11818
+ lappend DEFAULT_VECTCFLAGS "-ffast-math"
11819
+ set dg-do-what-default run
11776
11820
} else {
11777
11821
return 0
11778
11822
}
0 commit comments