This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] ACLE feature macro for Armv8.8-A MOPS
ClosedPublic

Authored by tyb0807 on Jan 25 2022, 2:58 PM.

Details

Summary

This introduces the new __ARM_FEATURE_MOPS ACLE feature test macro,
which signals the availability of the new Armv8.8-A/Armv9.3-A
instructions for standardising memcpy, memset and memmove operations.

This patch supersedes the one from https://reviews.llvm.org/D116160.

Diff Detail

Unit TestsFailed

Event Timeline

tyb0807 created this revision.Jan 25 2022, 2:58 PM
tyb0807 requested review of this revision.Jan 25 2022, 2:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2022, 2:58 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

This patch supersedes the one from https://reviews.llvm.org/D116160.

Can that one be abandoned then?

Yes, https://reviews.llvm.org/D116160 is deprecated and will be abandoned.

tyb0807 updated this revision to Diff 404347.Jan 30 2022, 12:05 AM

Add more tests and update accordingly to change from ACLE specification: __builtin_arm_mops_memset_tag requires _both_ MOPS and MTE features

tyb0807 updated this revision to Diff 404854.Feb 1 2022, 2:29 AM

Add support for +nomops

tyb0807 updated this revision to Diff 404897.Feb 1 2022, 5:36 AM

Revert latest patchset, as it should be put into a separate commit for clarity

chill added inline comments.Feb 1 2022, 8:31 AM
clang/lib/Basic/Targets/AArch64.cpp
229

What's the deal with "+nomops" ? This FIXME sort of contradicts with an earlier comment

Add support for +nomops

chill added a comment.Feb 1 2022, 8:41 AM

I suppose clang/test/CodeGen/aarch64-mops.c needs to be run with clang -march=armv8-a+mops+memtag (not clang_cc1) so it picks up declarations of tagging intrinsics from arm_acle.h.

chill added a comment.Feb 1 2022, 9:46 AM

I suppose clang/test/CodeGen/aarch64-mops.c needs to be run with clang -march=armv8-a+mops+memtag (not clang_cc1) so it picks up declarations of tagging intrinsics from arm_acle.h.

Uhm, scratch that.

For checking diagnostics, clang_cc1 --verify.

tyb0807 updated this revision to Diff 405080.Feb 1 2022, 1:31 PM
tyb0807 marked an inline comment as done.

Update tests with clang_cc1 -verify

clang/lib/Basic/Targets/AArch64.cpp
229

I wanted to add support for +nomops, but I think it is advisable to keep that in a separate commit to not block this review, so I reverted it with a FIXME

tyb0807 updated this revision to Diff 405083.Feb 1 2022, 1:37 PM

Update tests with clang -Xclang -verify

tyb0807 updated this revision to Diff 405085.Feb 1 2022, 1:39 PM

Remove prefix from tests

chill accepted this revision.Feb 8 2022, 4:08 AM
This revision is now accepted and ready to land.Feb 8 2022, 4:08 AM
This revision was landed with ongoing or failed builds.Feb 8 2022, 1:08 PM
This revision was automatically updated to reflect the committed changes.

Hi,

This change appears to break on of the buildbots (clang-ppc64le-linux-lnt):
https://lab.llvm.org/buildbot/#/builders/105/builds/21233/steps/7/logs/FAIL__Clang__aarch64-mops_c

******************** TEST 'Clang :: CodeGen/aarch64-mops.c' FAILED ********************
Script:
--
: 'RUN: at line 3';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -cc1 -internal-isystem /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/lib/clang/15.0.0/include -nostdsysteminc -triple aarch64-arm-unknown-eabi -target-feature +mops -target-feature +mte -S -emit-llvm -o - /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c  | /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c
: 'RUN: at line 4';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -cc1 -internal-isystem /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/lib/clang/15.0.0/include -nostdsysteminc -triple aarch64-arm-unknown-eabi -verify /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c
: 'RUN: at line 5';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -target aarch64-arm-none-eabi -march=armv8.7-a+mops+memtag          -S -emit-llvm /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c -o - | /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c
: 'RUN: at line 6';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -target aarch64-arm-none-eabi -march=armv8.8-a+memtag               -S -emit-llvm /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c -o - | /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c
: 'RUN: at line 7';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -target aarch64-arm-none-eabi -march=armv9.2-a+mops+memtag          -S -emit-llvm /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c -o - | /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c
: 'RUN: at line 8';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -target aarch64-arm-none-eabi -march=armv9.3-a+memtag               -S -emit-llvm /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c -o - | /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c
: 'RUN: at line 9';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -target aarch64-arm-none-eabi -march=armv8.7-a      -Xclang -verify -S -emit-llvm /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c -o -
: 'RUN: at line 10';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -target aarch64-arm-none-eabi -march=armv8.7-a+mops -Xclang -verify -S -emit-llvm /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c -o -
: 'RUN: at line 11';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -target aarch64-arm-none-eabi -march=armv8.8-a      -Xclang -verify -S -emit-llvm /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c -o -
: 'RUN: at line 12';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -target aarch64-arm-none-eabi -march=armv9.2-a      -Xclang -verify -S -emit-llvm /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c -o -
: 'RUN: at line 13';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -target aarch64-arm-none-eabi -march=armv9.2-a+mops -Xclang -verify -S -emit-llvm /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c -o -
: 'RUN: at line 14';   /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/clang -target aarch64-arm-none-eabi -march=armv9.3-a      -Xclang -verify -S -emit-llvm /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c -o -
--
Exit Code: 2
Command Output (stderr):
--
In file included from /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c:16:
In file included from /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/lib/clang/15.0.0/include/arm_acle.h:17:
In file included from /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/lib/clang/15.0.0/include/stdint.h:52:
In file included from /usr/include/stdint.h:26:
In file included from /usr/include/bits/libc-header-start.h:33:
In file included from /usr/include/features.h:452:
/usr/include/gnu/stubs.h:8:11: fatal error: 'gnu/stubs-32.h' file not found
# include <gnu/stubs-32.h>
          ^~~~~~~~~~~~~~~~
1 error generated.
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/stage1/bin/FileCheck /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/clang/test/CodeGen/aarch64-mops.c
--
********************
tyb0807 reopened this revision.Feb 8 2022, 4:12 PM

Reverted due to buildbots failures

This revision is now accepted and ready to land.Feb 8 2022, 4:12 PM
tyb0807 updated this revision to Diff 407155.Feb 9 2022, 7:10 AM

Fix buildbots failures

tyb0807 updated this revision to Diff 407159.Feb 9 2022, 7:31 AM

Turn off warnings for negative tests

chill accepted this revision.Feb 9 2022, 12:50 PM
This revision was landed with ongoing or failed builds.Feb 10 2022, 1:09 AM
This revision was automatically updated to reflect the committed changes.