I don't understand the test for !SCALAR_INT_MODE_P. That include BLKmode, but you call emit_move_insn in the new code, which won't work for BLKmode. What did you mean here? Perhaps SCALAR_FLOAT_MODE_P? The test case is compiling the Ada RTS file a-calend.adb with -O2 on x864-64.