Open amanasifkhalid opened 3 weeks ago
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
I'll take a look.
This one requires jit stress, specifically, STRESS_OPT_REPEAT
Issue is that we transform an XOR into a NOT, but the XOR has GTF_REVERSE_OPS
which we only expect to see on binary operations.
Fix seems to be simple enough, and this is not a product issue (reverse flag should be harmless on a unary op), so will not backport.
Easy to do a point fix, in morph when we transform xor->not we can clear GTF_REVERSE_OPS
.
But we do a lot of operator manipulation for HW intrinsics these days, seems like the general solution would be to reset some of this state when we change operators.
@tannergooding any thoughts?
But we do a lot of operator manipulation for HW intrinsics these days, seems like the general solution would be to reset some of this state when we change operators.
That sounds reasonable. We currently always indirectly go through SetHWIntrinsicId
when such transforms happen and that has some minimal validation about state already. So I suspect that'd be the right place to do it.
The direct callsites are ChangeHWIntrinsicId
and ResetHWIntrinsicId
. The former is required to keep the number of operands the same, while the latter can change the number of operands., but in both cases the caller is meant to update flags as appropriate.
Hit by Antigen on Windows x64:
cc @dotnet/jit-contrib