[llvm-branch-commits] [flang] 0de11b4 - [Flang] Restrict emit-asm-from-mlir.mlir to be ran on specific targets using 'target=...'

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 14 00:00:42 PST 2023


Author: Amy Kwan
Date: 2023-02-14T08:59:57+01:00
New Revision: 0de11b4790125e8f53e41515c4c7fec59ce59202

URL: https://github.com/llvm/llvm-project/commit/0de11b4790125e8f53e41515c4c7fec59ce59202
DIFF: https://github.com/llvm/llvm-project/commit/0de11b4790125e8f53e41515c4c7fec59ce59202.diff

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

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.

Differential Revision: https://reviews.llvm.org/D143366

(cherry picked from commit 71513f761cb8d334f903986c875f7d16ab2ddeaf)

Added: 
    

Modified: 
    flang/test/Driver/emit-asm-from-mlir.mlir

Removed: 
    


################################################################################
diff  --git a/flang/test/Driver/emit-asm-from-mlir.mlir b/flang/test/Driver/emit-asm-from-mlir.mlir
index 5b16d2938e783..99bbf1b93c42c 100644
--- a/flang/test/Driver/emit-asm-from-mlir.mlir
+++ b/flang/test/Driver/emit-asm-from-mlir.mlir
@@ -1,4 +1,4 @@
-// REQUIRES: aarch64-registered-target || x86-registered-target || arm-registered-target
+// REQUIRES: target=aarch64{{.*}} || target=x86{{.*}} || target=arm{{.*}}
 // Above restricts the test to those architectures that match "ret" to return
 // from a function.
 // Verify that the driver can consume MLIR/FIR files.


        


More information about the llvm-branch-commits mailing list