AMDGPU: Try to unfold fneg source when matching legacy fmin/fmax
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 15 Dec 2022 15:20:01 +0000 (10:20 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Fri, 3 Feb 2023 02:50:23 +0000 (22:50 -0400)
commit36cfe26a5288d99e66c75d82989d154874999b98
tree293a3b8709782ca7115c240c5f15f677a7d6556b
parent10d85dc75468074d2aceb1a648125167128d6f25
AMDGPU: Try to unfold fneg source when matching legacy fmin/fmax

This is NFC as it stands, since other combines will effectively
prevent this from being reachable. This will avoid regressions in a
future change which tries to make better use of select source
modifiers.

Didn't bother with the GlobalISel part for now, since the baseline
combine doesn't seem to work on the existing test.
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp
llvm/test/CodeGen/AMDGPU/fneg-combines.f16.ll
llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll