[llvm] dda3878 - [LoongArch] Fix build due to TLI interface changes. NFC.

Michael Liao via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 24 12:18:14 PDT 2022


Author: Michael Liao
Date: 2022-08-24T15:17:38-04:00
New Revision: dda38786534af733786c681e0c47b863e0626a0e

URL: https://github.com/llvm/llvm-project/commit/dda38786534af733786c681e0c47b863e0626a0e
DIFF: https://github.com/llvm/llvm-project/commit/dda38786534af733786c681e0c47b863e0626a0e.diff

LOG: [LoongArch] Fix build due to TLI interface changes. NFC.

- isCheapToSpeculateCttz/isCheapToSpeculateCtlz have one type operand
  after https://reviews.llvm.org/D132520

Added: 
    

Modified: 
    llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
    llvm/lib/Target/LoongArch/LoongArchISelLowering.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
index 3479662fed7c..fc3cade9b016 100644
--- a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
@@ -1743,9 +1743,13 @@ bool LoongArchTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT,
   return (Imm.isZero() || Imm.isExactlyValue(+1.0));
 }
 
-bool LoongArchTargetLowering::isCheapToSpeculateCttz() const { return true; }
+bool LoongArchTargetLowering::isCheapToSpeculateCttz(Type *) const {
+  return true;
+}
 
-bool LoongArchTargetLowering::isCheapToSpeculateCtlz() const { return true; }
+bool LoongArchTargetLowering::isCheapToSpeculateCtlz(Type *) const {
+  return true;
+}
 
 bool LoongArchTargetLowering::shouldInsertFencesForAtomic(
     const Instruction *I) const {

diff  --git a/llvm/lib/Target/LoongArch/LoongArchISelLowering.h b/llvm/lib/Target/LoongArch/LoongArchISelLowering.h
index d51b4b73f2b8..c5dca1ee87cf 100644
--- a/llvm/lib/Target/LoongArch/LoongArchISelLowering.h
+++ b/llvm/lib/Target/LoongArch/LoongArchISelLowering.h
@@ -96,8 +96,8 @@ class LoongArchTargetLowering : public TargetLowering {
                       SelectionDAG &DAG) const override;
   SDValue LowerCall(TargetLowering::CallLoweringInfo &CLI,
                     SmallVectorImpl<SDValue> &InVals) const override;
-  bool isCheapToSpeculateCttz() const override;
-  bool isCheapToSpeculateCtlz() const override;
+  bool isCheapToSpeculateCttz(Type *Ty) const override;
+  bool isCheapToSpeculateCtlz(Type *Ty) const override;
   bool hasAndNot(SDValue Y) const override;
 
 private:


        


More information about the llvm-commits mailing list