Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / Target / AMDGPU / AMDGPUCombinerHelper.h
bloba933e85ce3ca248123dd6dc62066caf69403a17e
1 //=== lib/CodeGen/GlobalISel/AMDGPUCombinerHelper.h -------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// This contains common combine transformations that may be used in a combine
11 /// pass.
12 ///
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"
21 using namespace llvm;
23 class AMDGPUCombinerHelper : public CombinerHelper {
24 public:
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