[llvm] LoopIdiomRecognize: detect and convert powi idiom (PR #72650)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 08:08:15 PST 2023


artagnon wrote:

> I don't know if this is out of the scope of this change, but all the loops in the unit tests get reduced to a select and the icmp 0. Would it better off eliminating the check all together? Seeing as we're calling the intrinsic and I think it can handle the 0 exponent.

I'd say it's out-of-scope of this change, since there may be unrelated computations in the loop (see test), and it's only loop-deletion that can detect that the loop is dead, and remove it entirely.

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


More information about the llvm-commits mailing list