Add floating point version of med3 combine.
Source is fminnum(fmaxnum(Val, K0), K1) or fmaxnum(fminnum(Val, K1), K0)
where K0 and K1 are constants and K0 <= K1.
Details
Details
- Reviewers
foad arsenm - Commits
- rGec54867d750b: AMDGPU/GlobalISel: Add floating point med3 combine
Diff Detail
Diff Detail
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp | ||
---|---|---|
174–175 ↗ | (On Diff #300311) | I am not really sure I know correct way to do it. Also this combine heavily depends on legalizer and primarily completing remaining of SNaN checks in isKnownNeverSNaN. |
llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp | ||
---|---|---|
172 ↗ | (On Diff #300311) | This will probably warn that Info is unused in a Release build. |
llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp | ||
---|---|---|
196 | Like in the other patches, why do you need to re-query getConstantFPVRegVal? Why doesn't the constant matcher just directly return the constant? |
llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp | ||
---|---|---|
192 | Util helpers and matchers use Optional. |
I don't see why to make these optional if they won't be set or used if the matcher return false