diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 12 | ||||
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h | 1 | ||||
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 12 | ||||
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIISelLowering.h | 2 | 
4 files changed, 14 insertions, 13 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp index 1b3b9d1e851..187137be4b1 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp @@ -935,18 +935,6 @@ bool AMDGPUTargetLowering::isZExtFree(SDValue Val, EVT VT2) const {    return isZExtFree(Val.getValueType(), VT2);  } -// v_mad_mix* support a conversion from f16 to f32. -// -// There is only one special case when denormals are enabled we don't currently, -// where this is OK to use. -bool AMDGPUTargetLowering::isFPExtFoldable(unsigned Opcode, -                                           EVT DestVT, EVT SrcVT) const { -  return ((Opcode == ISD::FMAD && Subtarget->hasMadMixInsts()) || -          (Opcode == ISD::FMA && Subtarget->hasFmaMixInsts())) && -         DestVT.getScalarType() == MVT::f32 && !Subtarget->hasFP32Denormals() && -         SrcVT.getScalarType() == MVT::f16; -} -  bool AMDGPUTargetLowering::isNarrowingProfitable(EVT SrcVT, EVT DestVT) const {    // There aren't really 64-bit registers, but pairs of 32-bit ones and only a    // limited number of native 64-bit operations. Shrinking an operation to fit diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h index e8052de9e8d..45c89235ac1 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h @@ -151,7 +151,6 @@ public:    bool isZExtFree(Type *Src, Type *Dest) const override;    bool isZExtFree(EVT Src, EVT Dest) const override;    bool isZExtFree(SDValue Val, EVT VT2) const override; -  bool isFPExtFoldable(unsigned Opcode, EVT DestVT, EVT SrcVT) const override;    bool isNarrowingProfitable(EVT VT1, EVT VT2) const override; diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp index a074e557f24..0a84f5371f5 100644 --- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp @@ -588,6 +588,18 @@ const SISubtarget *SITargetLowering::getSubtarget() const {  // TargetLowering queries  //===----------------------------------------------------------------------===// +// v_mad_mix* support a conversion from f16 to f32. +// +// There is only one special case when denormals are enabled we don't currently, +// where this is OK to use. +bool SITargetLowering::isFPExtFoldable(unsigned Opcode, +                                           EVT DestVT, EVT SrcVT) const { +  return ((Opcode == ISD::FMAD && Subtarget->hasMadMixInsts()) || +          (Opcode == ISD::FMA && Subtarget->hasFmaMixInsts())) && +         DestVT.getScalarType() == MVT::f32 && !Subtarget->hasFP32Denormals() && +         SrcVT.getScalarType() == MVT::f16; +} +  bool SITargetLowering::isShuffleMaskLegal(ArrayRef<int>, EVT) const {    // SI has some legal vector types, but no legal vector operations. Say no    // shuffles are legal in order to prefer scalarizing some vector operations. diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.h b/llvm/lib/Target/AMDGPU/SIISelLowering.h index ffb644fafbe..3acc91db287 100644 --- a/llvm/lib/Target/AMDGPU/SIISelLowering.h +++ b/llvm/lib/Target/AMDGPU/SIISelLowering.h @@ -157,6 +157,8 @@ public:    const SISubtarget *getSubtarget() const; +  bool isFPExtFoldable(unsigned Opcode, EVT DestVT, EVT SrcVT) const override; +    bool isShuffleMaskLegal(ArrayRef<int> /*Mask*/, EVT /*VT*/) const override;    bool getTgtMemIntrinsic(IntrinsicInfo &, const CallInst &,  | 

