mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 23:32:27 +00:00
R600: Implement isTruncateFree
Truncation is just accessing a subregister for any multiple of the register size, so it's free. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201107 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d5a9ea8afe
commit
700bba297b
@ -232,6 +232,11 @@ bool AMDGPUTargetLowering::isFNegFree(EVT VT) const {
|
||||
return VT == MVT::f32;
|
||||
}
|
||||
|
||||
bool AMDGPUTargetLowering::isTruncateFree(EVT, EVT Dest) const {
|
||||
// Truncate is just accessing a subregister.
|
||||
return (Dest.getSizeInBits() % 32 == 0);
|
||||
}
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
// TargetLowering Callbacks
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
|
||||
virtual bool isFAbsFree(EVT VT) const;
|
||||
virtual bool isFNegFree(EVT VT) const;
|
||||
virtual bool isTruncateFree(EVT Src, EVT Dest) const LLVM_OVERRIDE;
|
||||
virtual MVT getVectorIdxTy() const;
|
||||
virtual bool isLoadBitCastBeneficial(EVT, EVT) const LLVM_OVERRIDE;
|
||||
virtual SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv,
|
||||
|
Loading…
x
Reference in New Issue
Block a user