]> gcc.gnu.org Git - gcc.git/commit
LoongArch: fix signed overflow in loongarch_emit_int_compare
authorXi Ruoyao <xry111@xry111.site>
Thu, 3 Nov 2022 17:35:25 +0000 (01:35 +0800)
committerXi Ruoyao <xry111@xry111.site>
Wed, 9 Nov 2022 09:11:23 +0000 (17:11 +0800)
commitd699d32f47833cfab959a810dad48774c021c677
treead0f3eb8bd34c361d3c9fe8f4882c79a7c9443e1
parent1f9c79367e136e0ca5b775562e6111e1a0d0046f
LoongArch: fix signed overflow in loongarch_emit_int_compare

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.
gcc/config/loongarch/loongarch.cc
This page took 0.057352 seconds and 5 git commands to generate.