This patch replaces isKnownNonNull() with isKnownNonNullAt() when checking nullness of gc.relocate return value. In this way it can handle cases where the relocated value does not have nonnull attribute but has a dominating null check from the CFG.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM w/minor comment addressed.
test/Transforms/InstCombine/gc.relocate.ll | ||
---|---|---|
26 ↗ | (On Diff #34485) | I'd replace this vague check line with a bit of IR that will constant fold if the pointer is known non null. e.g. return (relocate == null); |