On 25/01/17 15:20, Christophe Lyon wrote:
On 25 January 2017 at 15:55, Bernd Schmidt <bschm...@redhat.com> wrote:
On 01/25/2017 10:18 AM, Kyrill Tkachov wrote:
The test is supposed to test the generation of the vsel instruction.
I believe adding an -mcpu=cortex-a57 to the testcases would be best, as
VSEL isn't actually available on Cortex-A5, it's just enabled by the
-mfpu=fp-armv8 option.
A more realistic configuration would target an ARMv8-A CPU like the
Cortex-A57.
Ok, let me know if there's anything else you need from my side.
Kyrill,
How about the attached patch?
Yes, thanks Christophe.
I've added dg-require-effective-target arm_arch_v8a_ok to make sure
it's legitimate to request an armv8-class core, but force -mcpu=cortex-a57
to make sure the intended instructions are present (in case at some
point add-options-for-arm-arch-v8a activates costs/arch variant that
would imply not generating vsel anymore).
I've noticed there are other tests adding arm_v8_vfp and not making
sure to select an appriopriate cpu. As a follow-up patch?
I wouldn't want to do that too much in the testsuite.
In the VSEL tests we have a C-level idiom (?: construct) that we expect
the optimisers to transform into a conditional select instruction that may or
may not
be a win on some cores.
In some of those other tests I suspect we want to generate the instruction for
all tunings.
I.e. I'd expect the rounding tests (__builtin_floor/trunc etc) to always
generate VRINT*
when the -mfpu allows it, regardless of the CPU tuning.
Kyrill
And I checked that my patch makes the tests pass again even
when configuring --with-cpu=cortex-a5.
Thanks,
Christophe
Bernd