Skip to content

Commit 6e7f08d

Browse files
authored
[CodeGen] Inline trivial TargetLoweringBase::getCmpLibcallReturnType method. NFC (#192483)
This trivial method makes more sense in the header (indeed, both the existing overrides for it are already in headers). I noticed this while hunting for the default value while reviewing #192425
1 parent 0ab165c commit 6e7f08d

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

llvm/include/llvm/CodeGen/TargetLowering.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,8 +996,9 @@ class LLVM_ABI TargetLoweringBase {
996996
/// Return the ValueType for comparison libcalls. Comparison libcalls include
997997
/// floating point comparison calls, and Ordered/Unordered check calls on
998998
/// floating point numbers.
999-
virtual
1000-
MVT::SimpleValueType getCmpLibcallReturnType() const;
999+
virtual MVT::SimpleValueType getCmpLibcallReturnType() const {
1000+
return MVT::i32; // return the default value
1001+
}
10011002

10021003
/// For targets without i1 registers, this gives the nature of the high-bits
10031004
/// of boolean values held in types wider than i1.

llvm/lib/CodeGen/TargetLoweringBase.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,10 +1959,6 @@ EVT TargetLoweringBase::getSetCCResultType(const DataLayout &DL, LLVMContext &,
19591959
return getPointerTy(DL).SimpleTy;
19601960
}
19611961

1962-
MVT::SimpleValueType TargetLoweringBase::getCmpLibcallReturnType() const {
1963-
return MVT::i32; // return the default value
1964-
}
1965-
19661962
/// getVectorTypeBreakdown - Vector types are broken down into some number of
19671963
/// legal first class types. For example, MVT::v8f32 maps to 2 MVT::v4f32
19681964
/// with Altivec or SSE1, or 8 promoted MVT::f64 values with the X86 FP stack.

0 commit comments

Comments
 (0)