Fix PR47973: Addressing integer division edge case with INT_MIN
authorAyshe Kuran <ayshek@ayshek-malt0.local>
Tue, 10 Nov 2020 14:15:32 +0000 (14:15 +0000)
committerThomas Preud'homme <thomasp@graphcore.ai>
Tue, 10 Nov 2020 15:57:06 +0000 (15:57 +0000)
commit55ec2ba4bc36a0aa4c1d0bfddde312a120b05f1a
treefaa1f455b05a829de020f3b078942605d113fa77
parentdcde6f17fd5db9097c8aca696b11808abd65b0fd
Fix PR47973: Addressing integer division edge case with INT_MIN

Adjustment to integer division in int_div_impl.inc to avoid undefined behaviour that can occur as a result of having INT_MIN as one of the parameters.

Reviewed By: sepavloff

Differential Revision: https://reviews.llvm.org/D90218
compiler-rt/lib/builtins/int_div_impl.inc