https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111376
--- Comment #10 from YunQiang Su <syq at gcc dot gnu.org> --- I have some performance test. sll+bgez is some slower than lui+and+beqz. On Loongson 3A4000, it is about 10%. So this "optimization" makes sense only for -Os.