[Local] Emit nsw for inbounds offset calculation
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 13 Nov 2020 17:38:26 +0000 (18:38 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 13 Nov 2020 17:39:46 +0000 (18:39 +0100)
commit30b5c3f3a647ce9c5d3d2db5439592f9f00697c7
tree8042788fe2c22ef4da9ceb0d418db83b98d42ab1
parent6c20c1da1e5cb1b014043f2ef3bba2550d5f5a67
[Local] Emit nsw for inbounds offset calculation

In line with D90708, we can use nsw for the inbounds offset
calculation -- the muls were already using nsw, but the adds were
not.
llvm/include/llvm/Analysis/Utils/Local.h
llvm/test/Transforms/InstCombine/sub-gep.ll
llvm/test/Transforms/InstCombine/sub.ll