On 23 September 2017 at 16:12, Christophe Lyon
<christophe.l...@linaro.org> wrote:
> On 21 September 2017 at 16:48, Tamar Christina <tamar.christ...@arm.com> 
> wrote:
>> Hi All,
>>
>> Commit r244796 changed vect_hw_misalign for arm to check against
>> arm_vect_no_misalign. However vect_hw_misalign is supposed to check if
>> a target supports misalign access, while arm_vect_no_misalign checks that
>> a target only supports aligned access.
>>
>> As such the results need to be inverted otherwise the test runs in exactly 
>> the
>> wrong circumstances.
>>
>> Committed as r253073 under the GCC obvious rule.
>
> Hi Tamar,
>
> This is not as obvious as we might think. This patch is causing tcl
> syntax errors,
> such as:
> error executing dg-final: expected boolean value but got "!1"
>
> I plan to send a fix b/o next week.
>

The attached patch would apply after reverting yours.
I've applied it against r253072 (just before your patch) and the
results are visible at:
http://people.linaro.org/~christophe.lyon/cross-validation/gcc-test-patches/253072-hw-misalign2/report-build-info.html

Do they match your expectations? It looks like a few testcases need to
be adjusted,
or new bugs are uncovered.

If the patch OK with a suitable ChangeLog entry?

Thanks,

Christophe

> Christophe
>
>>
>> Thanks,
>> Tamar
>>
>> gcc/ChangeLog
>> 2017-09-21  Tamar Christina  <tamar.christ...@arm.com>
>>
>>         PR testsuite/78421
>>         * lib/target-supports.exp (check_effective_target_vect_hw_misalign):
>>         Invert arm check.
>>
>> --
diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 2e0e4d43..133b1ac 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5951,7 +5951,14 @@ proc check_effective_target_vect_hw_misalign { } {
          set et_vect_hw_misalign_saved($et_index) 1
        }
        if { [istarget arm*-*-*] } {
-           set et_vect_hw_misalign_saved($et_index) 
[check_effective_target_arm_vect_no_misalign]
+           # We just want to invert the (boolean) value of
+           # arm_vect_no_misalign, but using the ! operator does not
+           # work when callers use the result of vect_hw_misalign
+           if { [check_effective_target_arm_vect_no_misalign] } {
+               set et_vect_hw_misalign_saved($et_index) 0
+           } else {
+               set et_vect_hw_misalign_saved($et_index) 1
+           }
        }
     }
     verbose "check_effective_target_vect_hw_misalign:\

Reply via email to