diff options
author | Gabor Marton <gabor.marton@ericsson.com> | 2021-03-25 15:29:41 +0100 |
---|---|---|
committer | Gabor Marton <gabor.marton@ericsson.com> | 2021-03-25 18:25:06 +0100 |
commit | 015c39882ebc1771713a7523ae76903ebae83288 (patch) | |
tree | dc476815f4abe7d28bd774bf1b4bdd6e4d5eb410 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 0324b46cd873abc4fabe19f4bd468d10398ffd0d (diff) | |
download | llvm-015c39882ebc1771713a7523ae76903ebae83288.zip llvm-015c39882ebc1771713a7523ae76903ebae83288.tar.gz llvm-015c39882ebc1771713a7523ae76903ebae83288.tar.bz2 |
[Analyzer] Infer 0 value when the divisible is 0 (bug fix)
Currently, we infer 0 if the divisible of the modulo op is 0:
int a = x < 0; // a can be 0
int b = a % y; // b is either 1 % sym or 0
However, we don't when the op is / :
int a = x < 0; // a can be 0
int b = a / y; // b is either 1 / sym or 0 / sym
This commit fixes the discrepancy.
Differential Revision: https://reviews.llvm.org/D99343
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions