Instead of sub and mul instructions, use v_mad, v_mac or v_fma if fma
instructions are faster and are legal for the given architecture.
Combiner for a case that has one multiplication, which gets negated and
extended, and from that the third argument is subtracted. This combiner
will transform that into two extends and one negation within the fma/fmad
instruction.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Put back the accidentally deleted combiner from the list of combiners (load_or_combine).
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | ||
---|---|---|
4481–4482 | First, fadd only has as single type index. Second, I don't think there's much point in checking it's legality. It doesn't imply "LegalOperations" | |
4488 | We have a separate check for before the legalizer. FMA also only has one type index | |
4527 | Should probably be using mi_matches for all of these instead of your own getVRegDefs and nested ifs |
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | ||
---|---|---|
4725 | Should have mi_match support for fneg/fpext and use that |
Comment Actions
Use m_MInstr instead of m_Reg in matching patterns (mi_match).
Formatting and refactoring.
Should have mi_match support for fneg/fpext and use that