[llvm] [NVPTX] Implement `isTruncateFree(EVT FromVT, EVT ToVT)` (PR #138605)

Kevin McAfee via llvm-commits llvm-commits at lists.llvm.org
Mon May 5 17:54:20 PDT 2025


================
@@ -155,11 +155,19 @@ class NVPTXTargetLowering : public TargetLowering {
                              Instruction *I = nullptr) const override;
 
   bool isTruncateFree(Type *SrcTy, Type *DstTy) const override {
----------------
kalxr wrote:

Seems like Hexagon is the only target that does it this way, but seems simpler:
 https://github.com/llvm/llvm-project/blob/1c1238d3615a7e1a99570d1e02de3b538d2e0669/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp#L2145

https://github.com/llvm/llvm-project/pull/138605


More information about the llvm-commits mailing list