mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
R600: Always implement both versions of isTruncateFree and add a sanity check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201222 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cfd14e6aea
commit
eee40f92a9
@ -232,9 +232,15 @@ bool AMDGPUTargetLowering::isFNegFree(EVT VT) const {
|
||||
return VT == MVT::f32;
|
||||
}
|
||||
|
||||
bool AMDGPUTargetLowering::isTruncateFree(EVT, EVT Dest) const {
|
||||
bool AMDGPUTargetLowering::isTruncateFree(EVT Source, EVT Dest) const {
|
||||
// Truncate is just accessing a subregister.
|
||||
return (Dest.getSizeInBits() % 32 == 0);
|
||||
return Dest.bitsLT(Source) && (Dest.getSizeInBits() % 32 == 0);
|
||||
}
|
||||
|
||||
bool AMDGPUTargetLowering::isTruncateFree(Type *Source, Type *Dest) const {
|
||||
// Truncate is just accessing a subregister.
|
||||
return Dest->getPrimitiveSizeInBits() < Source->getPrimitiveSizeInBits() &&
|
||||
(Dest->getPrimitiveSizeInBits() % 32 == 0);
|
||||
}
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
@ -79,10 +79,11 @@ protected:
|
||||
public:
|
||||
AMDGPUTargetLowering(TargetMachine &TM);
|
||||
|
||||
virtual bool isFAbsFree(EVT VT) const;
|
||||
virtual bool isFNegFree(EVT VT) const;
|
||||
virtual bool isFAbsFree(EVT VT) const LLVM_OVERRIDE;
|
||||
virtual bool isFNegFree(EVT VT) const LLVM_OVERRIDE;
|
||||
virtual bool isTruncateFree(EVT Src, EVT Dest) const LLVM_OVERRIDE;
|
||||
virtual MVT getVectorIdxTy() const;
|
||||
virtual bool isTruncateFree(Type *Src, Type *Dest) const LLVM_OVERRIDE;
|
||||
virtual MVT getVectorIdxTy() const LLVM_OVERRIDE;
|
||||
virtual bool isLoadBitCastBeneficial(EVT, EVT) const LLVM_OVERRIDE;
|
||||
virtual SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv,
|
||||
bool isVarArg,
|
||||
|
Loading…
x
Reference in New Issue
Block a user