Skip to content

Commit 56fe245

Browse files
committed
remove static declaration
1 parent fa357a2 commit 56fe245

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,10 @@ void LoongArchDAGToDAGISel::Select(SDNode *Node) {
154154

155155
// Select appropriate [x]vldi instructions for some special constant splats,
156156
// where the immediate value `imm[12] == 1` for used [x]vldi instructions.
157+
const auto &TLI =
158+
*static_cast<const LoongArchTargetLowering *>(getTargetLowering());
157159
std::pair<bool, uint64_t> ConvertVLDI =
158-
LoongArchTargetLowering::isImmVLDILegalForMode1(SplatValue,
159-
SplatBitSize);
160+
TLI.isImmVLDILegalForMode1(SplatValue, SplatBitSize);
160161
if (ConvertVLDI.first) {
161162
Op = Is256Vec ? LoongArch::XVLDI : LoongArch::VLDI;
162163
SDValue Imm = CurDAG->getSignedTargetConstant(

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8512,9 +8512,8 @@ SDValue LoongArchTargetLowering::LowerReturn(
85128512
// Note: The following prefixes are excluded:
85138513
// imm[11:8] == 4'b0000, 4'b0100, 4'b1000
85148514
// as they can be represented using [x]vrepli.[whb]
8515-
std::pair<bool, uint64_t>
8516-
LoongArchTargetLowering::isImmVLDILegalForMode1(const APInt &SplatValue,
8517-
const unsigned SplatBitSize) {
8515+
std::pair<bool, uint64_t> LoongArchTargetLowering::isImmVLDILegalForMode1(
8516+
const APInt &SplatValue, const unsigned SplatBitSize) const {
85188517
uint64_t RequiredImm = 0;
85198518
uint64_t V = SplatValue.getZExtValue();
85208519
if (SplatBitSize == 16 && !(V & 0x00FF)) {

llvm/lib/Target/LoongArch/LoongArchISelLowering.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,9 @@ class LoongArchTargetLowering : public TargetLowering {
341341

342342
/// Check if a constant splat can be generated using [x]vldi, where imm[12]
343343
/// is 1.
344-
static std::pair<bool, uint64_t>
345-
isImmVLDILegalForMode1(const APInt &SplatValue, const unsigned SplatBitSize);
344+
std::pair<bool, uint64_t>
345+
isImmVLDILegalForMode1(const APInt &SplatValue,
346+
const unsigned SplatBitSize) const;
346347

347348
private:
348349
/// Target-specific function used to lower LoongArch calling conventions.

0 commit comments

Comments
 (0)