aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/StringMapTest.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-09-01 23:13:01 +0200
committerNikita Popov <nikita.ppv@gmail.com>2021-09-02 20:15:59 +0200
commitc86e1ce73bb6d70d255df9bf7700d09db07e7af8 (patch)
tree546dfd2272066bfec080521abc10909f6ae7c63d /llvm/unittests/ADT/StringMapTest.cpp
parentad2f94f3987fdb0488c98a7973f0c2ac12c64821 (diff)
downloadllvm-c86e1ce73bb6d70d255df9bf7700d09db07e7af8.zip
llvm-c86e1ce73bb6d70d255df9bf7700d09db07e7af8.tar.gz
llvm-c86e1ce73bb6d70d255df9bf7700d09db07e7af8.tar.bz2
[SCEVExpander] Simplify pointer overflow check
This is a followup to D104662 to generate slightly nicer code for pointer overflow checks. Bypass expandAddToGEP and instead explicitly generate i8 GEPs. This saves some bitcasts and negates the value in a more obvious way. In particular, this prevents SCEV from looking through the umul.with.overflow, same as in the integer case. The wrapping-pointer-ni.ll test deserves a comment: Previously, this generated a typed GEP which used the umulo argument rather than the multiplication result. This results in more compact IR in that case, but effectively does the multiplication twice, the second one is just hidden in the GEP. Reusing the umulo result seems pretty reasonable to me. Differential Revision: https://reviews.llvm.org/D109093
Diffstat (limited to 'llvm/unittests/ADT/StringMapTest.cpp')
0 files changed, 0 insertions, 0 deletions