This is an archive of the discontinued LLVM Phabricator instance.

[Arm] Remove duplicate CPU tests
ClosedPublic

Authored by tmatheson on Dec 30 2021, 8:38 AM.

Details

Summary

There are some duplicate test lines in clang/test/Driver/arm-cortex-cpus.c.
Looks like these were duplicated from the corresponding v8.0a tests, which test
both "-target armv8" and "-target armv8a". "-target armv8.X" without the "a"
doesn't work for later versions though.

Several tests also specify the -mlittle-endian twice, which looks unintentional.

Diff Detail

Event Timeline

tmatheson created this revision.Dec 30 2021, 8:38 AM
tmatheson requested review of this revision.Dec 30 2021, 8:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 30 2021, 8:38 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
nickdesaulniers accepted this revision.Dec 30 2021, 10:06 AM
nickdesaulniers added a subscriber: nickdesaulniers.
nickdesaulniers added inline comments.
clang/test/Driver/arm-cortex-cpus.c
217

I'm definitely ok with the half of changes in this patch that remove -mlittle-endian when it appears twice on one line.

The other half of the changes remove -mlittle-endian when it's not specified more than once. I suspect -mlittle-endian is implied by -target in this case; was the test validating that by being explicit about endianness? I guess I don't see how being explicit about the endianness could affect the -triple, which is what is being checked, so I guess this LGTM.

This revision is now accepted and ready to land.Dec 30 2021, 10:06 AM
tmatheson added inline comments.Dec 31 2021, 1:00 AM
clang/test/Driver/arm-cortex-cpus.c
217

The second set of changes that you mention are the duplicate tests that you pointed out in D116159. For example, this line that is removed is a duplicate of line 219.

Thanks for the review @nickdesaulniers. Adding a few more reviewers just to check that I'm not missing something.

lenary accepted this revision.Jan 4 2022, 5:25 AM

There is also a duplicate line (lines 29 and 31) of // RUN: %clang -target arm -march=armv5 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5-THUMB %s which I think can be removed when you land this.

This revision was landed with ongoing or failed builds.Jan 4 2022, 7:22 AM
This revision was automatically updated to reflect the committed changes.