On 1 November 2016 at 23:41, Uros Bizjak <ubiz...@gmail.com> wrote:
> On Tue, Nov 1, 2016 at 5:05 PM, Jakub Jelinek <ja...@redhat.com> wrote:
>> On Tue, Nov 01, 2016 at 10:05:22AM +0100, Uros Bizjak wrote:
>>> ... simplify some conditions and add i?86-*-* target where missing.
>>>
>>> 2016-11-01  Uros Bizjak  <ubiz...@gmail.com>
>>>
>>>     * lib/target-supports.exp: Normalize order of i?86 and x86_64 targets.
>>>     Whitespace fixes.
>> ...
>>>     (check_effective_target_divmod): Add i?86-*-* target.
>>
>> This part likely broke
>> +FAIL: gcc.dg/divmod-1.c scan-tree-dump-times widening_mul "DIVMOD" 7
>> +FAIL: gcc.dg/divmod-2.c scan-tree-dump-times widening_mul "DIVMOD" 7
>> +FAIL: gcc.dg/divmod-3.c scan-tree-dump-times widening_mul "DIVMOD" 7
>> +FAIL: gcc.dg/divmod-4.c scan-tree-dump-times widening_mul "DIVMOD" 7
>> +FAIL: gcc.dg/divmod-6.c scan-tree-dump-times widening_mul "DIVMOD" 7
>> on i686-linux (i.e. 32-bit).
>
> No, this is expected (these tests already fail with x86_64 -m32
> multilib). These will be fixed by [1].
Oops, sorry for the breakage.
The tests are meant to check if the divmod transform triggered, which
is done by scanning
DIVMOD in the widening_mul dump.

Apparently I only checked for the triplet "x86_64-*-*" in
check_effective_target_divmod()
and it returned 1, which probably caused the divmod DImode tests to
fail with -m32.

In general, could I check in check_effective_target_*(), what options
are passed ?
So in case of -m32, I wanted to return 0 instead of 1 to make the
tests on 32-bit
UNSUPPORTED.

Thanks for fixing the test-cases!

Thanks,
Prathamesh
>
> [1] https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02483.html
>
> Uros.
>
>> Dunno what exactly the tests are meant to test, most likely they just
>> need extra guards or something.  Can be reproduced even on x86_64-linux
>> with
>> make check-gcc RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} dg.exp=divmod*'
>>
>>> @@ -8110,7 +8090,7 @@
>>>      #TODO: Add checks for all targets that have either hardware divmod insn
>>>      # or define libfunc for divmod.
>>>      if { [istarget arm*-*-*]
>>> -      || [istarget x86_64-*-*] } {
>>> +      || [istarget i?86-*-*] || [istarget x86_64-*-*] } {
>>>       return 1
>>>      }
>>>      return 0
>>
>>
>>         Jakub

Reply via email to