Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / Target / AMDGPU / R600Subtarget.cpp
blobe5a8c5cf3baf6f9c52f924a07b847fc012cf476b
1 //===-- R600Subtarget.cpp - R600 Subtarget Information --------------------===//
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 /// Implements the R600 specific subclass of TargetSubtarget.
12 //===----------------------------------------------------------------------===//
14 #include "R600Subtarget.h"
15 #include "MCTargetDesc/R600MCTargetDesc.h"
17 using namespace llvm;
19 #define DEBUG_TYPE "r600-subtarget"
21 #define GET_SUBTARGETINFO_TARGET_DESC
22 #define GET_SUBTARGETINFO_CTOR
23 #include "R600GenSubtargetInfo.inc"
25 R600Subtarget::R600Subtarget(const Triple &TT, StringRef GPU, StringRef FS,
26 const TargetMachine &TM)
27 : R600GenSubtargetInfo(TT, GPU, /*TuneCPU*/ GPU, FS), AMDGPUSubtarget(TT),
28 InstrInfo(*this),
29 FrameLowering(TargetFrameLowering::StackGrowsUp, getStackAlignment(), 0),
30 TLInfo(TM, initializeSubtargetDependencies(TT, GPU, FS)),
31 InstrItins(getInstrItineraryForCPU(GPU)) {
32 AddressableLocalMemorySize = LocalMemorySize;
35 R600Subtarget &R600Subtarget::initializeSubtargetDependencies(const Triple &TT,
36 StringRef GPU,
37 StringRef FS) {
38 SmallString<256> FullFS("+promote-alloca,");
39 FullFS += FS;
40 ParseSubtargetFeatures(GPU, /*TuneCPU*/ GPU, FullFS);
42 HasMulU24 = getGeneration() >= EVERGREEN;
43 HasMulI24 = hasCaymanISA();
45 return *this;