[PATCH] D107872: [SimplifyLibCalls] propagate tail/musttail/notail flags on CallInsts
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 11 16:55:33 PDT 2021
nickdesaulniers added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:630
return Dst;
}
----------------
xbolva00 wrote:
> nickdesaulniers wrote:
> > jdoerfert wrote:
> > > Mostly this makes sense but doesn't this violate tail properties now? The old call result was return but it is not anymore.
> > perhaps we should be avoiding libcall transforms that don't return the new `CallInst` if the `CallInst` to be replaced is marked `musttail`? Let me add `musttail` tests.
> You mean eg musttail on strncpy?
>
> Well yeah, but anyway there are many other libcall simplifications which break “musttail” contract (so if CI is musttail, we should not perform some simplifications).
>
> But yeah, now with propagated tail kind, some IR verifier or backend may fail.
>
> Nick, can you try it please?
Yeah, there's 11 cases that I'm updating from Diff 377048. I will write 11 new tests, too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107872/new/
https://reviews.llvm.org/D107872
More information about the llvm-commits
mailing list