File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
tests/codegen-llvm/scalable-vectors Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ // Compiletest for #150419: Do not spill operand debuginfo to stack for
2+ // AArch64 SVE predicates `<vscale x N x i1>` where `N != 16`
3+ //@ edition: 2021
4+ //@ only-aarch64
5+ //@ build-pass
6+ //@ compile-flags: -C debuginfo=2 -C target-feature=+sve
7+
8+ #![ allow( internal_features) ]
9+ #![ feature( rustc_attrs, link_llvm_intrinsics) ]
10+
11+ #[ rustc_scalable_vector( 16 ) ]
12+ #[ allow( non_camel_case_types) ]
13+ #[ repr( transparent) ]
14+ pub struct svbool_t ( bool ) ;
15+
16+ #[ rustc_scalable_vector( 4 ) ]
17+ #[ allow( non_camel_case_types) ]
18+ #[ repr( transparent) ]
19+ pub struct svbool4_t ( bool ) ;
20+
21+ impl std:: convert:: Into < svbool_t > for svbool4_t {
22+ #[ inline( always) ]
23+ fn into ( self ) -> svbool_t {
24+ unsafe extern "C" {
25+ #[ link_name = "llvm.aarch64.sve.convert.to.svbool.nxv4i1" ]
26+ fn convert_to_svbool ( b : svbool4_t ) -> svbool_t ;
27+ }
28+ unsafe { convert_to_svbool ( self ) }
29+ }
30+ }
31+
32+ pub fn svwhilelt_b32_u64 ( op1 : u64 , op2 : u64 ) -> svbool_t {
33+ unsafe extern "C" {
34+ #[ link_name = "llvm.aarch64.sve.whilelo.nxv4i1.u64" ]
35+ fn _svwhilelt_b32_u64 ( op1 : u64 , op2 : u64 ) -> svbool4_t ;
36+ }
37+ unsafe { _svwhilelt_b32_u64 ( op1, op2) } . into ( )
38+ }
You can’t perform that action at this time.
0 commit comments