diff --git a/llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp b/llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp index 2993726d2b649d..4e504729b23e2d 100644 --- a/llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp +++ b/llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp @@ -149,7 +149,8 @@ void LoongArchFrameLowering::processFunctionBeforeFrameFinalized( unsigned ScavSlotsNum = 0; - // Far branches beyond 27-bit offset require a spill slot for scratch register. + // Far branches beyond 27-bit offset require a spill slot for scratch + // register. bool IsLargeFunction = !isInt<27>(estimateFunctionSizeInBytes(TII, MF)); if (IsLargeFunction) ScavSlotsNum = 1; diff --git a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp index e5c80644d4a83e..d83fd2b4d25fd4 100644 --- a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp +++ b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp @@ -4950,7 +4950,8 @@ bool LoongArchTargetLowering::isZExtFree(SDValue Val, EVT VT2) const { return TargetLowering::isZExtFree(Val, VT2); } -bool LoongArchTargetLowering::isSExtCheaperThanZExt(EVT SrcVT, EVT DstVT) const { +bool LoongArchTargetLowering::isSExtCheaperThanZExt(EVT SrcVT, + EVT DstVT) const { return Subtarget.is64Bit() && SrcVT == MVT::i32 && DstVT == MVT::i64; } diff --git a/llvm/lib/Target/LoongArch/LoongArchSubtarget.h b/llvm/lib/Target/LoongArch/LoongArchSubtarget.h index a6e40840517fa8..bfdfdcf36d66e8 100644 --- a/llvm/lib/Target/LoongArch/LoongArchSubtarget.h +++ b/llvm/lib/Target/LoongArch/LoongArchSubtarget.h @@ -32,7 +32,7 @@ class StringRef; class LoongArchSubtarget : public LoongArchGenSubtargetInfo { virtual void anchor(); -#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \ +#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \ bool ATTRIBUTE = DEFAULT; #include "LoongArchGenSubtargetInfo.inc" @@ -83,7 +83,7 @@ class LoongArchSubtarget : public LoongArchGenSubtargetInfo { return &TSInfo; } -#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \ +#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \ bool GETTER() const { return ATTRIBUTE; } #include "LoongArchGenSubtargetInfo.inc"