This patch adds isGuaranteedNotToBePoison and programUndefinedIfUndefOrPoison.
isGuaranteedNotToBePoison will be used at D75808. The latter function is used at isGuaranteedNotToBePoison.
Paths
| Differential D84242
[ValueTracking] Add UndefOrPoison/Poison-only version of relevant functions ClosedPublic Authored by aqjune on Jul 21 2020, 8:39 AM.
Details Summary This patch adds isGuaranteedNotToBePoison and programUndefinedIfUndefOrPoison. isGuaranteedNotToBePoison will be used at D75808. The latter function is used at isGuaranteedNotToBePoison.
Diff Detail
Event Timelineaqjune added a child revision: D75808: [ValueTracking] isKnownNonZero, computeKnownBits for freeze.Jul 21 2020, 9:33 AM
aqjune added inline comments.
aqjune added a parent revision: D84251: [ValueTracking] Fix incorrect handling of canCreateUndefOrPoison.Jul 21 2020, 10:42 AM Comment Actions Rebase,
Comment Actions Rebase, and have a few changes to maximally utilize noundef attributes. %I = or i32 x, 1 ; if x = undef, %I is partially undef call void @f(i32 noundef %I) This revision is now accepted and ready to land.Sep 8 2020, 2:23 PM This revision was landed with ongoing or failed builds.Sep 9 2020, 4:01 AM Closed by commit rG25ce1e049725: [ValueTracking] Add UndefOrPoison/Poison-only version of relevant functions (authored by aqjune). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 290691 llvm/include/llvm/Analysis/ValueTracking.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Transforms/Instrumentation/PoisonChecking.cpp
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/unittests/Analysis/ValueTrackingTest.cpp
|
As these functions are the same, I would just rename getGuaranteedNonPoisonOp to getGuaranteedNonUndefOrPoisonOp.