Re: [PATCH v2] LoongArch: fix signed overflow in loongarch_emit_int_compare

2022-11-08 Thread Lulu Cheng
LGTM. Thanks! 在 2022/11/9 下午3:26, Xi Ruoyao 写道: Signed overflow is an undefined behavior, so we need to prevent it from happening, instead of "checking" the result. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_emit_int_compare): Avoid signed overflow. --- v1 -> v

[PATCH v2] LoongArch: fix signed overflow in loongarch_emit_int_compare

2022-11-08 Thread Xi Ruoyao via Gcc-patches
Signed overflow is an undefined behavior, so we need to prevent it from happening, instead of "checking" the result. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_emit_int_compare): Avoid signed overflow. --- v1 -> v2: break instead of continue if the inc/dec will ove