1 //=== lib/CodeGen/GlobalISel/AMDGPUCombinerHelper.h -------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 /// This contains common combine transformations that may be used in a combine
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUCOMBINERHELPER_H
16 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUCOMBINERHELPER_H
18 #include "llvm/CodeGen/GlobalISel/Combiner.h"
19 #include "llvm/CodeGen/GlobalISel/CombinerHelper.h"
23 class AMDGPUCombinerHelper
: public CombinerHelper
{
25 using CombinerHelper::CombinerHelper
;
27 bool matchFoldableFneg(MachineInstr
&MI
, MachineInstr
*&MatchInfo
);
28 void applyFoldableFneg(MachineInstr
&MI
, MachineInstr
*&MatchInfo
);
30 bool matchExpandPromotedF16FMed3(MachineInstr
&MI
, Register Src0
,
31 Register Src1
, Register Src2
);
32 void applyExpandPromotedF16FMed3(MachineInstr
&MI
, Register Src0
,
33 Register Src1
, Register Src2
);
36 #endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUCOMBINERHELPER_H