The fix seems trivial and looks good. Please submit to at least fix the crasher.
One note for this and future, similar patches: can you minimize the test case any? At the least stripping off some of the metadata cruft and comment boiler plate would be good.
Also, please always run FileCheck and assert that reasonable instructions are generated. "doesn't crash" isn't the most useful test case, and small cases like this should be easy to check that sane instructions come out.