Skip to content

[flang][test] Run Driver/fveclib-codegen.f90 for aarch64 and x86_64 #103730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion flang/test/Driver/fveclib-codegen.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
! test that -fveclib= is passed to the backend
! -target aarch64 so that ArmPL is available
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are here, I don't quite understand this comment. @tblah , why is this referring to ArmPL? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic of the flag (at least when I added it) checks that the specified veclib is supported on the particular target. To test ArmPL we have to have an aarch64 target otherwise the driver will generate an error. See rorth@a207e63

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying!

To test ArmPL we have to have an aarch64 target otherwise the driver will generate an error.

Right, but that's not what this comment is saying:

! -target aarch64 so that ArmPL is available

Also, looks like this is testing LIBMVEC rather than ArmPl.

IMHO, referring to something that's not being tested is confusing :) Let's either add ArmPl or remove this comment 🙏🏻

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I see. Sorry I had this confused with the other test which still checks ArmPL. See #105528

! RUN: %flang -S -Ofast -fveclib=LIBMVEC -o - %s | FileCheck %s
! RUN: %if aarch64-registered-target %{ %flang -S -Ofast -target aarch64-unknown-linux-gnu -fveclib=LIBMVEC -o - %s | FileCheck %s %}
! RUN: %if x86-registered-target %{ %flang -S -Ofast -target x86_64-unknown-linux-gnu -fveclib=LIBMVEC -o - %s | FileCheck %s %}
! RUN: %flang -S -Ofast -fveclib=NoLibrary -o - %s | FileCheck %s --check-prefix=NOLIB

subroutine sb(a, b)
Expand Down
Loading