|
1 | 1 | //@ compile-flags: -Copt-level=3
|
2 |
| -//@ revisions: host x86-64-v3 |
| 2 | +//@ revisions: host x86-64 x86-64-v3 |
3 | 3 | //@ min-llvm-version: 20
|
4 | 4 |
|
5 |
| -// This particular CPU regressed in #131563 |
| 5 | +//@[host] ignore-x86_64 |
| 6 | + |
| 7 | +// Set the base cpu explicitly, in case the default has been changed. |
| 8 | +//@[x86-64] only-x86_64 |
| 9 | +//@[x86-64] compile-flags: -Ctarget-cpu=x86-64 |
| 10 | + |
| 11 | +// FIXME(cuviper) x86-64-v3 in particular regressed in #131563, and the workaround |
| 12 | +// at the time still sometimes fails, so only verify it for the power-of-two size |
| 13 | +// - https://github.com/llvm/llvm-project/issues/134735 |
6 | 14 | //@[x86-64-v3] only-x86_64
|
7 | 15 | //@[x86-64-v3] compile-flags: -Ctarget-cpu=x86-64-v3
|
8 | 16 |
|
|
12 | 20 | pub fn test() -> usize {
|
13 | 21 | // CHECK-LABEL: @test(
|
14 | 22 | // host: ret {{i64|i32}} 165
|
| 23 | + // x86-64: ret {{i64|i32}} 165 |
15 | 24 |
|
16 | 25 | // FIXME: Now that this autovectorizes via a masked load, it doesn't actually
|
17 | 26 | // const-fold for certain widths. The `test_eight` case below shows that, yes,
|
18 | 27 | // what we're emitting *can* be const-folded, except that the way LLVM does it
|
19 | 28 | // for certain widths doesn't today. We should be able to put this back to
|
20 | 29 | // the same check after <https://github.com/llvm/llvm-project/issues/134513>
|
21 |
| - // x86-64-v3: <i64 23, i64 16, i64 54, i64 3> |
22 |
| - // x86-64-v3: llvm.masked.load |
23 |
| - // x86-64-v3: %[[R:.+]] = {{.+}}llvm.vector.reduce.add.v4i64 |
24 |
| - // x86-64-v3: ret i64 %[[R]] |
| 30 | + // x86-64-v3: masked.load |
25 | 31 |
|
26 | 32 | let values = [23, 16, 54, 3, 60, 9];
|
27 | 33 | let mut acc = 0;
|
|
0 commit comments