llvm / llvm/llvm-project

`FLANG_TEST_TARGET_TRIPLE` does not work well in some cases

Open
#164,637 0 comments 0 reactions 0 assignees View on GitHub
flang test-suite
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

When I build Flang with the following configuration on an AArch64 machine, several tests fail.

```console
$ cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=../install \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_PROJECTS="flang" \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_TARGET_TRIPLE_ENV="DEFAULT_TRIPLE" \
-DFLANG_TEST_TARGET_TRIPLE="powerpc64le-unknown-linux-gnu" \
/path/to/llvm-project/llvm

$ ninja check-flang
...
********************
Failed Tests (2):
Flang :: Driver/emit-asm-from-mlir.mlir
Flang :: Semantics/PowerPC/ppc-vector-types03.f90


Testing Time: 53.76s

Total Discovered Tests: 3929
Unsupported : 171 (4.35%)
Passed : 3745 (95.32%)
Expectedly Failed: 11 (0.28%)
Failed : 2 (0.05%)
```

If I manually set "DEFAULT_TRIPLE" to `powerpc64le-unknown-linux-gnu`, all tests pass.

```console
$ env DEFAULT_TRIPLE="powerpc64le-unknown-linux-gnu" ninja check-flang
...
Testing Time: 59.91s

Total Discovered Tests: 3929
Unsupported : 136 (3.46%)
Passed : 3782 (96.26%)
Expectedly Failed: 11 (0.28%)
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the configuration with CMake, FLANG_TEST_TARGET_TRIPLE set to powerpc64le-unknown-linux-gnu, then run ninja check-flang. Start with the two reported failures, Flang :: Driver/emit-asm-from-mlir.mlir and Flang :: Semantics/PowerPC/ppc-vector-types03.f90, and compare that behavior with DEFAULT_TRIPLE set in the environment. Done means the target-triple configuration makes both tests pass without manually setting DEFAULT_TRIPLE.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
compilers, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.