diff mbox

[AArch64] Implement vsqrt_f64 intrinsic

Message ID 5476F6F0.4020103@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Nov. 27, 2014, 10:03 a.m. UTC
On 26/11/14 10:14, Christophe Lyon wrote:
> Hi Kyrill,
Hi Christophe,

>
>
> On 21 November 2014 at 16:52, Marcus Shawcroft
> <marcus.shawcroft@gmail.com> wrote:
>> On 17 November 2014 17:35, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
>>
>>> 2014-11-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>>
>>>      * config/aarch64/arm_neon.h (vsqrt_f64): New intrinsic.
>>>
>>> 2014-11-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>>
>>>      * gcc.target/aarch64/simd/vsqrt_f64_1.c
>> OK /Marcus
> Your new test fails at the scan-assembly step because all the code is
> optimized away (even at -O1).

Sorry about that, I could have sworn I saw it pass when I initially 
wrote it...
In any case, I've committed this patch (r218117) as obvious to mark one 
of the variables as volatile
to make sure it's not optimised away.
I've confirmed that the scan-assembler test fails without this patch and 
passes with it.

Thanks,
Kyrill

>
> Christophe.
>

Comments

Kyrylo Tkachov Nov. 27, 2014, 10:04 a.m. UTC | #1
On 27/11/14 10:03, Kyrill Tkachov wrote:
> On 26/11/14 10:14, Christophe Lyon wrote:
>> Hi Kyrill,
> Hi Christophe,
>
>>
>> On 21 November 2014 at 16:52, Marcus Shawcroft
>> <marcus.shawcroft@gmail.com> wrote:
>>> On 17 November 2014 17:35, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
>>>
>>>> 2014-11-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>>>
>>>>       * config/aarch64/arm_neon.h (vsqrt_f64): New intrinsic.
>>>>
>>>> 2014-11-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>>>
>>>>       * gcc.target/aarch64/simd/vsqrt_f64_1.c
>>> OK /Marcus
>> Your new test fails at the scan-assembly step because all the code is
>> optimized away (even at -O1).
> Sorry about that, I could have sworn I saw it pass when I initially
> wrote it...
> In any case, I've committed this patch (r218117) as obvious to mark one
> of the variables as volatile
> to make sure it's not optimised away.
> I've confirmed that the scan-assembler test fails without this patch and
> passes with it.

With the following ChangeLog for completeness sake:

2014-11-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * gcc.target/aarch64/simd/vsqrt_f64_1.c: Mark variable volatile.

>
> Thanks,
> Kyrill
>
>> Christophe.
> >
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vsqrt_f64_1.c b/gcc/testsuite/gcc.target/aarch64/simd/vsqrt_f64_1.c
index 57fb6bb..7f99bd5 100644
--- a/gcc/testsuite/gcc.target/aarch64/simd/vsqrt_f64_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/simd/vsqrt_f64_1.c
@@ -11,7 +11,7 @@  extern void abort (void);
 int
 main (void)
 {
-  float64x1_t in = vcreate_f64(0x3febd3e560634d7bULL);
+  volatile float64x1_t in = vcreate_f64(0x3febd3e560634d7bULL);
   float64x1_t result = vsqrt_f64 (in);
   float64_t expected = 0.9325321502142351;