Skip to content

JIT: Faster comparison against Vector128<>.Zero #63829

@EgorBo

Description

@EgorBo

A good first issue for those who are interested in SIMD and ARM64. Should improve #63285

bool IsZero(Vector128<byte> v) => v == Vector128<byte>.Zero;

Currently is suboptimal on ARM64:
image

while I'd expect it to emit something like this:
image

so if one of the args of == is _Zero it needs to use umaxv, it should be done here:

comp->gtNewSimdHWIntrinsicNode(simdType, cmp, NI_AdvSimd_Arm64_MinAcross, CORINFO_TYPE_UBYTE, simdSize);

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIgood first issueIssue should be easy to implement, good for first-time contributorshelp wanted[up-for-grabs] Good issue for external contributorstenet-performancePerformance related issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions