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