[llvm] [InstCombine] optimize powi(X,Y) * X with Ofast (PR #69998)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 23:20:27 PST 2024


vfdff wrote:

 

> > ```
> > * According to above discussion, many other optimizations have similar problems due to the need to recursively determine the operand `fmt attributes` involved. But in fact, the problem has not been exposed for so long. Is it because these `fmt attributes` are set in units of at least one function, that is, IR operands in the same function should be consistent? That's why this problem has not been exposed for so long?
> > ```
> 
> Fast-math flags tend to be applied on a per-project basis via command-line (i.e., per-IR module) flags, so it tends to be very rare for the flags to differ within a function, unless you're doing LTO, which is why it's unlikely to crop up very frequently.

Thanks, I add **the restrict for the operands of fmul**.

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


More information about the llvm-commits mailing list