From b3cfd5bb04d1622b4bd35da7983e29321be18e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Fri, 20 Oct 2023 00:00:00 +0000 Subject: [PATCH] Precommit target features compatibility test --- tests/mir-opt/inline/inline_compatibility.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/mir-opt/inline/inline_compatibility.rs b/tests/mir-opt/inline/inline_compatibility.rs index 988fbe333366..8045ea39f95b 100644 --- a/tests/mir-opt/inline/inline_compatibility.rs +++ b/tests/mir-opt/inline/inline_compatibility.rs @@ -29,6 +29,14 @@ pub unsafe fn f1() { sse2(); } +// CHECK-LABEL: fn f2() +// CHECK: bb0: { +// CHECK-NEXT: return; +#[target_feature(enable = "avx")] +pub unsafe fn f2() { + nop(); +} + #[inline] #[no_sanitize(address)] pub unsafe fn no_sanitize() {}