[PATCH] D147704: [Inliner] Preserve nonnull from callsites during inlining
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 00:34:26 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1475
+ auto *ArgVal = CB.getArgOperand(ArgNo);
+ if (CB.getAttributes().hasParamAttr(ArgNo, Attribute::NonNull) && !isKnownNonZero(ArgVal, DL, 0, AC)) {
+ CallInst *NewAsmp = Builder.CreateNonNullAssumption(CB.getArgOperand(ArgNo));
----------------
aeubanks wrote:
> are there tests for `isKnownNonZero`?
You need both nonnull and noundef to convert to assume.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147704/new/
https://reviews.llvm.org/D147704
More information about the llvm-commits
mailing list