-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
@CarolEidt @AndyAyersMS PTAL The code below was compiled incorrectly that static unsafe ulong test(ulong a, ulong b)
{
ulong r;
Bmi2.X64.MultiplyNoFlags(a, b, &r);
return r;
}
|
Hmm, this intrinsic should be treated as a memory store. Is it? I guess this is another peculiar thing about it - the other memory stores don't return a value AFAIR. |
Right, the importer usually forces to append the expr into the IR tree if it returns VOID. But this intrinsic has a real return value and memory store semantic simultaneously. |
Do we know why this isn't this covered by it both being a memory store (https://github.com/dotnet/coreclr/blob/master/src/jit/gentree.cpp#L17920) and the intrinsics having been updated to be special handled in |
@tannergooding this happens in the importer and doesn’t reach that point. |
Check how |
I believe that it needs to be marked as having a side-effect. In the |
Ah, thank you so much, will try. |
Added |
I think that you should also change |
Yes, |
@CarolEidt @erozenfeld Lines 5063 to 5081 in 459b58a
|
Wow, right there as I was looking at it, and I missed it! Thanks. |
test Ubuntu arm Cross Checked Innerloop Build and Test |
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 - thanks!
Don't optimize MultiplyNoFlags away Commit migrated from dotnet/coreclr@b3881b4
Contribute to https://github.com/dotnet/coreclr/issues/21899