This is an archive of the discontinued LLVM Phabricator instance.

[Flang] Restrict emit-asm-from-mlir.mlir to be ran on specific targets using 'target=...'
ClosedPublic

Authored by amyk on Feb 5 2023, 9:21 PM.

Details

Summary

This patch aims to restrict the emit-asm-from-mlir.mlir test to the targets that the test
cases expect using the 'target=...' LIT expression.

rG9067de2a43145411eff8b7782a404c5834249717 has previously attempted to
resolve the LIT failure on the ppc64le-flang-rhel-clang buildbot coming from the
emit-asm-from-mlir.mlir test by restricting the test case for AArch64, x86 and ARM
(as long as these targets are built). The original solution of adding "*-registered-target"
works on ppc64le-flang-rhel-clang because this bot only builds PowerPC in
LLVM_TARGETS_TO_BUILD.

When we build all targets and also build the flang project, this test case will fail because
despite being on PowerPC, we are still building the AArch64, x86 and ARM targets which
will cause this test to run. These targets expect the ret instruction to be produced in this
test case, while PowerPC produces a blr instead.

Diff Detail

Event Timeline

amyk created this revision.Feb 5 2023, 9:21 PM
amyk requested review of this revision.Feb 5 2023, 9:21 PM
amyk edited the summary of this revision. (Show Details)Feb 5 2023, 9:21 PM

The comment suggests that it wants a (default) target that has particular characteristics, so updating REQUIRES to match that intent seems like a better approach.

flang/test/Driver/emit-asm-from-mlir.mlir
1–2

// REQUIRES: target=aarch64{{.*}} || target=x86{{.*}} || target=arm{{.*}}

amyk marked an inline comment as done.Feb 6 2023, 6:02 PM
amyk added inline comments.
flang/test/Driver/emit-asm-from-mlir.mlir
1–2

Good point. I will adjust this REQUIRES line instead.

amyk updated this revision to Diff 495340.Feb 6 2023, 6:04 PM
amyk marked an inline comment as done.

Address review comment to update the REQUIRES line instead.

This revision is now accepted and ready to land.Feb 7 2023, 6:30 AM
amyk retitled this revision from [Flang] Mark emit-asm-from-mlir.mlir as UNSUPPORTED for PowerPC using 'target=...' to [Flang] Restrict emit-asm-from-mlir.mlir to be ran on specific targets using 'target=...'.Feb 7 2023, 6:59 AM
amyk edited the summary of this revision. (Show Details)