[llvm] [X86] Remove LowerFCanonicalize and use generic expansion (PR #147877)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 10 00:29:15 PDT 2025


arsenm wrote:

> > Do not add a new TLI hook for this
> 
> The hook is used to distinguish between X86 and (AMDGPU systemZ) behavior for vector FCANONICALIZE.

You should not be trying to distinguish these, and this problem has nothing to do with canonicalize and everything to do with how much of a mess the vector legalization logic and process is. The legalizer has a bias towards just scalarizing everything, so the AMDGPU workaround is to just custom lower all the vectors and manually split them for the cases where there are legal vector types. 

Dealing with this is beyond the scope of this patch, just remove what's there and take whatever regression happens. 

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


More information about the llvm-commits mailing list