[PATCH] D118426: [InstCombine] Remove side effect of replaced constrained intrinsics
Kevin P. Neal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 22 11:57:35 PST 2022
kpn added a comment.
In D118426#3337963 <https://reviews.llvm.org/D118426#3337963>, @sepavloff wrote:
> In D118426#3337489 <https://reviews.llvm.org/D118426#3337489>, @kpn wrote:
>
>> It seems like these dangling, useless instructions would interfere with subsequent optimizations until finally they might or might not get removed here. And constant folding isn't sufficient to duplicate the logic of the transform pass that determined the instruction could be deleted.
>
> InstCombine is called several times, it calls constant folding and instruction simplification functions. It looks like a good place to get rid of such useless instructions.
My point is that it shouldn't be needed for eliminating dead constrained intrinsics that are still around only because the exception behavior is "strict" when a transform pass has proved to itself that no exception can ever take place.
We do run InstCombiner often enough that it is a decent place to eliminate useless instructions. I don't think it is ideal, but it's fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118426/new/
https://reviews.llvm.org/D118426
More information about the llvm-commits
mailing list