This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add missing intrinsics for vcls
ClosedPublic

Authored by jaykang10 on Mar 2 2021, 8:15 AM.

Diff Detail

Event Timeline

jaykang10 created this revision.Mar 2 2021, 8:15 AM
jaykang10 requested review of this revision.Mar 2 2021, 8:15 AM

This is the Clang part. Do we need to add anything for LLVM, for example tests?

PS. Please upload a diff with more context next time.

This is the Clang part. Do we need to add anything for LLVM, for example tests?

PS. Please upload a diff with more context next time.

Sorry... I forgot to create a diff with more context. I will do it next time.

It looks the signed/unsigned vcls intrinsics are implemented by same __builtin_neon_vcls_v function on clang. You can see it from 'arm_neon.h' in build directory. I think we do not need to add something for the unsigned vcls on llvm.

I am 100% sure but it looks the failed unit tests on x64 windows are not related to this patch...

Yeah, they are almost certainly unrelated.

Can you tests in clang/test/CodeGen/aarch64-neon-misc.c too, to covert the AArch64 side?

Yeah, they are almost certainly unrelated.

Can you tests in clang/test/CodeGen/aarch64-neon-misc.c too, to covert the AArch64 side?

Yep, I have run llvm-lit with test on x86 ubuntu 18.04 and it has been passed as below.

-- Testing: 1 tests, 1 workers --
PASS: Clang :: CodeGen/aarch64-neon-misc.c (1 of 1)

Testing Time: 2.42s
  Passed: 1

Ah, Dave's remark is a good one. These intrinsics are available in both AAch64 and ARM, and I missed that you covered only ARM here; Dave meant to add these tests for AArch64 too.

The LLVM side indeed looks in order: the AArch64 tests live in tests/CodeGen/AArch64/arm64-vcnt.ll, and the ARM tests in tests/CodeGen/ARM/vcnt.ll.

Yeah. I mean, arm_neon.td drives two backends - ARM and AArch64. This adds test for ARM (you can tell because of the llvm.arm.neon.vcls), there should ideally also be tests for llvm.aarcht64.neon.vcls.

Yeah. I mean, arm_neon.td drives two backends - ARM and AArch64. This adds test for ARM (you can tell because of the llvm.arm.neon.vcls), there should ideally also be tests for llvm.aarcht64.neon.vcls.

Ah, sorry. I misunderstood what you said. Yep, I will add the tests for AArch64.

jaykang10 updated this revision to Diff 327696.Mar 3 2021, 12:36 AM

Added tests for AArch64

SjoerdMeijer accepted this revision.Mar 3 2021, 1:56 AM

Thanks, LGTM.

This revision is now accepted and ready to land.Mar 3 2021, 1:56 AM
This revision was landed with ongoing or failed builds.Mar 3 2021, 2:36 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2021, 2:36 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript