[ValueTracking] Add with.overflow intrinsics to poison analysis functions
authorJuneyoung Lee <aqjune@gmail.com>
Wed, 31 Mar 2021 17:01:17 +0000 (02:01 +0900)
committerJuneyoung Lee <aqjune@gmail.com>
Wed, 31 Mar 2021 17:41:38 +0000 (02:41 +0900)
commitdf0b97dab08abb8605533974f6b977c183f6be37
treedab7c8df854d92efbf38427cf922258a668e4b8c
parentae7b1e8823a51068cfa64875fc5222e5b1d16760
[ValueTracking] Add with.overflow intrinsics to poison analysis functions

This is a patch teaching ValueTracking that `s/u*.with.overflow` intrinsics do not
create undef/poison and they propagate poison.
I couldn't write a nice example like the one with ctpop; ValueTrackingTest.cpp were simply updated
to check these instead.
This patch helps reducing regression while fixing https://llvm.org/pr49688 .

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D99671
llvm/lib/Analysis/ValueTracking.cpp
llvm/unittests/Analysis/ValueTrackingTest.cpp