x64 jitter sub-expression elimination optimizer bug - by nobugz

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


2
0
Sign in
to vote
ID 812093 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 12/20/2013 4:58:25 AM
Access Restriction Public

Description

The x64 jitter optimizer incorrectly eliminates the sub-expression in this code, moving the expression inside the loop:

    int dummy;

    public void TestFunction(int stepWidth)                             // test with stepWidth = 8
    {
        for (int step = 0; step < stepWidth; step++)
        {
            dummy = step + 1000; 
            for (int x = 0; x < 20; x += stepWidth)
            {
                int index = x + 1000 + step; 
                Console.Write("\n\r" + index);
            }
        }
    }

This bug is present in all current versions of mscorjit.dll and clrjit.dll

A good description of this bug with repro code is available in this SO question:

http://stackoverflow.com/questions/20701701/jit-net-compiler-bug/20703780#20703780
Sign in to post a comment.
Posted by Microsoft on 12/22/2013 at 10:36 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 12/20/2013 at 5:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)