diff --git a/llvm/lib/Target/CSKY/CSKYISelLowering.cpp b/llvm/lib/Target/CSKY/CSKYISelLowering.cpp index a65a0283777f04..a08ba27f6ec365 100644 --- a/llvm/lib/Target/CSKY/CSKYISelLowering.cpp +++ b/llvm/lib/Target/CSKY/CSKYISelLowering.cpp @@ -153,8 +153,7 @@ CSKYTargetLowering::CSKYTargetLowering(const TargetMachine &TM, setMaxAtomicSizeInBitsSupported(0); setStackPointerRegisterToSaveRestore(CSKY::R14); - const Align FunctionAlignment(2); - setMinFunctionAlignment(FunctionAlignment); + setMinFunctionAlignment(Align(2)); setSchedulingPreference(Sched::Source); } diff --git a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp index de720c5ece8982..233eb3ab9542c4 100644 --- a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp +++ b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp @@ -195,8 +195,7 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM, setMinCmpXchgSizeInBits(32); // Function alignments. - const Align FunctionAlignment(4); - setMinFunctionAlignment(FunctionAlignment); + setMinFunctionAlignment(Align(4)); setTargetDAGCombine(ISD::AND); setTargetDAGCombine(ISD::OR);