aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorksyx <18738953+ksyx@users.noreply.github.com>2021-11-13 15:59:43 -0500
committerksyx <18738953+ksyx@users.noreply.github.com>2021-11-19 20:24:36 -0500
commit97b9e8438e269a999969b08d4efe20c3d71013ca (patch)
treec78d4f84a5169c9017ac13380175db2ed9218cf0 /llvm/lib/Transforms/Utils/LoopUtils.cpp
parent1bd4dc4f2854edf3035732416ec7e4adbddaf982 (diff)
downloadllvm-97b9e8438e269a999969b08d4efe20c3d71013ca.zip
llvm-97b9e8438e269a999969b08d4efe20c3d71013ca.tar.gz
llvm-97b9e8438e269a999969b08d4efe20c3d71013ca.tar.bz2
[GVN][NFC] Remove redundant check
The if-check above deleted part guarantees that StoreOffset <= LoadOffset and that StoreOffset + StoreSize >= LoadOffset + LoadSize, and given that LoadOffset + LoadSize > LoadOffset when LoadSize > 0. Thus, this shows StoreOffset + StoreSize > LoadOffset is guaranteed given LoadSize > 0, while it could be meaningless to have a type with nonpositive size, so that the check could be removed. The values are converted to signed types to avoid unsigned operation with negative offsets. Part of revision D100179 Reapply commit c35e8185d8c170c20e28956e0c9f3c1be895fefb with fixing problem reported by mstorsjo
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions