[llvm] [AMDGPU] Use two v_xor_b32 instructions in fneg v2f32 selection pattern (PR #195585)

Changpeng Fang via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 00:07:24 PDT 2026


changpeng wrote:

I am not sure whether do we want to make fcanonicalize <2 x float> legal at all. At least I do not see actual benefit with legalization itself. Note that currently  'fcanonicalize <2 x float>' is legalized on global isel path but not on selection DAG path.
legalized:         v_pk_mul_f32 v[0:1], 1.0, v[0:1] op_sel_hi:[0,1]
not legalized:   v_dual_max_num_f32 v0, v0, v0 :: v_dual_max_num_f32 v1, v1, v1



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


More information about the llvm-commits mailing list