[llvm] [GlobalISel][AArch64][AMDGPU] Lower FPOWI into series of multiplication (PR #95217)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 06:29:02 PDT 2024


arsenm wrote:

> > Where do you see this optimization?
> 
> It is in [SelectionDAGBuilder.cpp](https://github.com/isuckatcs/llvm-project/blob/2ca8c856eeae739ec1e7242ee7e69f99ecf376d3/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp#L5790)

Ugh, the DAG builder should definitely not be doing optimizations like this. But yes, this only works on constants and thus should not be a legalization strategy. It should be an optimization only in the CombinerHelper 

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


More information about the llvm-commits mailing list