Merge optimization patch from graysky2/kernel_gcc_patch