Regression test for optimizing that used to generate invalid code for arm.