[llvm] [InstCombineCompare] Use known bits to insert assume intrinsics. (PR #96017)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 23:44:23 PDT 2024
goldsteinn wrote:
> Yes, I've read this in IR reference too. But in theory, do you think this is a right thing to do? Or is there some principle problem with using assume intrinsics that can not be fixed? If you can point out some issue with assume intrinsics I can work on it in another MR.
>
It creates extra uses: https://godbolt.org/z/xecq1YEda
which inturn block a fair number of optimizations.
We could theoretically add some infrastructure for discounting `assume` uses (or maybe simpler in this case, to only do this if `%x` is not an instruction or has more than some threshold of uses where we don't expect it to ever become single-use).
https://github.com/llvm/llvm-project/pull/96017
More information about the llvm-commits
mailing list