-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure that GT_CNS_VEC is handled in LinearScan::isMatchingConstant #70171
Conversation
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsThis is a small follow up to #68874 but provides decent improvements, particularly where the same constant (Zero and AllBitsSet in particular) is repeatedly used.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and easy change.
Example diffs Note that vpcmpeqd ymm7, ymm7, ymm7
vxorps ymm6, ymm7, ymm6
vcmpps ymm4, ymm4, ymm0, 0
vorps ymm4, ymm4, ymm6
- vpcmpeqd ymm6, ymm6, ymm6
- vpcmpeqd ymm4, ymm4, ymm6
+ vpcmpeqd ymm4, ymm4, ymm7 Note how vmovupd ymm2, ymmword ptr[reloc @RWD00]
vpshufb ymm0, ymm0, ymm2
vperm2i128 ymm0, ymm0, ymm0, 1
- vmovupd ymm2, ymmword ptr[reloc @RWD00]
vpshufb ymm1, ymm1, ymm2 |
@@ -147,6 +147,7 @@ int LinearScan::BuildNode(GenTree* tree) | |||
case GT_CNS_INT: | |||
case GT_CNS_LNG: | |||
case GT_CNS_DBL: | |||
case GT_CNS_VEC: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting ARM64 already had a path here since it needed special handling for Zero
and AllBitsSet
, it just wasn't getting used in LSRA
@kunalspathak could you take a look? Its super small (8 lines) but touches LSRA so I'd appreciate your sign-off as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Egor Bogatov <[email protected]>
This is a small follow up to #68874 but provides decent improvements, particularly where the same constant (Zero and AllBitsSet in particular) is repeatedly used.