[llvm] [IPSCCP] Infer attributes on arguments (PR #107114)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 02:04:15 PDT 2024


nikic wrote:

> > > Missing fold: https://alive2.llvm.org/ce/z/dufVNK
> > 
> > 
> > Isn't this handled by CVP? https://alive2.llvm.org/ce/z/2sDmsW
> 
> It seems like a phase-ordering problem.

The problem is loss of information due to ConstantRange intersection. We already have a range for the value from the argument attribute, and the select condition excludes part of that range. But this exclusion is small, so we stay with the original range as the more "optimal" one (by size). I don't think there's any easy solution to this. (We could track ranges for two sign preferences, but this will add a lot of overhead.)

https://github.com/llvm/llvm-project/pull/107114


More information about the llvm-commits mailing list