about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2025-04-08 23:26:36 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2025-04-09 21:44:59 -0700
commit4207c786e752ed7495782c39b74917bbcaf438cf (patch)
treee70ae7381568dfda84a4de562fd7d275f490b150 /tests/codegen
parente30cb329d81cc83a082f6919943361b8d9710509 (diff)
downloadrust-4207c786e752ed7495782c39b74917bbcaf438cf.tar.gz
rust-4207c786e752ed7495782c39b74917bbcaf438cf.zip
PR feedback
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/issues/issue-101082.rs18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/codegen/issues/issue-101082.rs b/tests/codegen/issues/issue-101082.rs
index 89295da5bd1..96cdff64dda 100644
--- a/tests/codegen/issues/issue-101082.rs
+++ b/tests/codegen/issues/issue-101082.rs
@@ -1,8 +1,16 @@
 //@ compile-flags: -Copt-level=3
-//@ revisions: host x86-64-v3
+//@ revisions: host x86-64 x86-64-v3
 //@ min-llvm-version: 20
 
-// This particular CPU regressed in #131563
+//@[host] ignore-x86_64
+
+// Set the base cpu explicitly, in case the default has been changed.
+//@[x86-64] only-x86_64
+//@[x86-64] compile-flags: -Ctarget-cpu=x86-64
+
+// FIXME(cuviper) x86-64-v3 in particular regressed in #131563, and the workaround
+// at the time still sometimes fails, so only verify it for the power-of-two size
+// - https://github.com/llvm/llvm-project/issues/134735
 //@[x86-64-v3] only-x86_64
 //@[x86-64-v3] compile-flags: -Ctarget-cpu=x86-64-v3
 
@@ -12,16 +20,14 @@
 pub fn test() -> usize {
     // CHECK-LABEL: @test(
     // host: ret {{i64|i32}} 165
+    // x86-64: ret {{i64|i32}} 165
 
     // FIXME: Now that this autovectorizes via a masked load, it doesn't actually
     // const-fold for certain widths.  The `test_eight` case below shows that, yes,
     // what we're emitting *can* be const-folded, except that the way LLVM does it
     // for certain widths doesn't today.  We should be able to put this back to
     // the same check after <https://github.com/llvm/llvm-project/issues/134513>
-    // x86-64-v3: <i64 23, i64 16, i64 54, i64 3>
-    // x86-64-v3: llvm.masked.load
-    // x86-64-v3: %[[R:.+]] = {{.+}}llvm.vector.reduce.add.v4i64
-    // x86-64-v3: ret i64 %[[R]]
+    // x86-64-v3: masked.load
 
     let values = [23, 16, 54, 3, 60, 9];
     let mut acc = 0;