Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JIT: Optimize "X & 1 == 0" to "X & 1" #61412

Closed
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
Milestone
@EgorBo

Description

@EgorBo
staticboolTest(intx)=>(x&1)==0;

Just a good first issue for anyone interested in contributing to CLR JIT.

Current codegen:

testcl,1setealmovzxrax,alret

Expected codegen:

moveax,ecxandeax,1ret

I noticed it when I was trying to implement a faster IsNegative for floats:

staticboolIsNegative(doublex)=>(Sse2.MoveMask(Vector128.CreateScalarUnsafe(x))&1)!=0;

Metadata

Metadata

Assignees

No one assigned

    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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp