diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-05-21 12:47:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-21 12:47:06 +0200 |
| commit | fd975f75fa843c53f9944697689f2a45c35fd7b7 (patch) | |
| tree | 60daeca2ee328736fd862e09ab854708bee967a2 /compiler/rustc_codegen_cranelift/src | |
| parent | a8ee8d508646816b535fc008f80c1d1ed9ccaa96 (diff) | |
| parent | 213351ae9e7d6745a70457925546cd032d4f0c51 (diff) | |
| download | rust-fd975f75fa843c53f9944697689f2a45c35fd7b7.tar.gz rust-fd975f75fa843c53f9944697689f2a45c35fd7b7.zip | |
Rollup merge of #125266 - workingjubilee:stream-plastic-love, r=RalfJung,nikic
compiler: add simd_ctpop intrinsic Fairly straightforward addition. cc `@rust-lang/opsem` new (extremely boring) intrinsic
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs index 452b5988dab..b17f191ce26 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs @@ -348,6 +348,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>( | sym::simd_bswap | sym::simd_bitreverse | sym::simd_ctlz + | sym::simd_ctpop | sym::simd_cttz => { intrinsic_args!(fx, args => (a); intrinsic); @@ -367,6 +368,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>( (ty::Uint(_) | ty::Int(_), sym::simd_bswap) => fx.bcx.ins().bswap(lane), (ty::Uint(_) | ty::Int(_), sym::simd_bitreverse) => fx.bcx.ins().bitrev(lane), (ty::Uint(_) | ty::Int(_), sym::simd_ctlz) => fx.bcx.ins().clz(lane), + (ty::Uint(_) | ty::Int(_), sym::simd_ctpop) => fx.bcx.ins().popcnt(lane), (ty::Uint(_) | ty::Int(_), sym::simd_cttz) => fx.bcx.ins().ctz(lane), _ => unreachable!(), |
