D-Programming-Language/dmd — pull request #749 by yebblies (2012-02-20 15:22:20+00:00)
Title: Improve codegen for OPmsw

`(int)(msw (long))` -> `(int)*(&x+4)`
`(long)(msw (cent))` -> `(long)*(&x+8)`

These ops are quite common when using arrays.

I'm not sure how to make test cases for this... I've examined the assembly and it now generates the same code as it does for pointers. How do you write test cases for the optimizer, apart from the thousands of existing array element assignments that are testing this doesn't generate wrong code?