[PATCH] R600: Implement isNarrowingProfitable.
Matt Arsenault
Matthew.Arsenault at amd.com
Tue Mar 18 12:57:33 PDT 2014
http://llvm-reviews.chandlerc.com/D3113
Files:
lib/Target/R600/AMDGPUISelLowering.cpp
lib/Target/R600/AMDGPUISelLowering.h
Index: lib/Target/R600/AMDGPUISelLowering.cpp
===================================================================
--- lib/Target/R600/AMDGPUISelLowering.cpp
+++ lib/Target/R600/AMDGPUISelLowering.cpp
@@ -328,6 +328,10 @@
(Dest->getPrimitiveSizeInBits() % 32 == 0);
}
+bool AMDGPUTargetLowering::isNarrowingProfitable(EVT SrcVT, EVT DestVT) const {
+ return SrcVT.getScalarSizeInBits() > 32 || DestVT.getScalarSizeInBits() <= 32;
+}
+
//===---------------------------------------------------------------------===//
// TargetLowering Callbacks
//===---------------------------------------------------------------------===//
Index: lib/Target/R600/AMDGPUISelLowering.h
===================================================================
--- lib/Target/R600/AMDGPUISelLowering.h
+++ lib/Target/R600/AMDGPUISelLowering.h
@@ -108,6 +108,8 @@
virtual bool isFNegFree(EVT VT) const override;
virtual bool isTruncateFree(EVT Src, EVT Dest) const override;
virtual bool isTruncateFree(Type *Src, Type *Dest) const override;
+ virtual bool isNarrowingProfitable(EVT VT1, EVT VT2) const override;
+
virtual MVT getVectorIdxTy() const override;
virtual bool isLoadBitCastBeneficial(EVT, EVT) const override;
virtual SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3113.1.patch
Type: text/x-patch
Size: 1300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140318/b548c2b1/attachment.bin>
More information about the llvm-commits
mailing list