diff options
author | Wu Yingcong <yingcong.wu@intel.com> | 2025-04-17 09:33:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-17 09:33:48 +0800 |
commit | 6b8d072cfd41f647f2c241f0a1a0843a279d049b (patch) | |
tree | 1b25ae52682822b57a9d83a5068aa5ad6d33453f /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | 6d8bf3cf3dcc5d85bec7b1e70a59a02cdfdaa1b4 (diff) | |
download | llvm-6b8d072cfd41f647f2c241f0a1a0843a279d049b.zip llvm-6b8d072cfd41f647f2c241f0a1a0843a279d049b.tar.gz llvm-6b8d072cfd41f647f2c241f0a1a0843a279d049b.tar.bz2 |
[libc] Fix incorrect unsigned comparison (#135595)
There is a problem with such unsigned comparison pattern:
```
if(unsigned_a - unsigned_b > 0) { /* only NOT go here when unsigned_a==unsigned_b */ }
```
When `unsigned_a` < `unsigned_b`, the result will still be `>0` due to
underflow.
This patch fixes two of the occurrences I found.
Also remove two redundant `if` where its condition is guaranteed by
outer `if`.
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions