diff options
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/CodeGen/TargetLowering.h')
-rw-r--r-- | contrib/llvm-project/llvm/include/llvm/CodeGen/TargetLowering.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/TargetLowering.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/TargetLowering.h index 490125164ab3..ed2b513be960 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/TargetLowering.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/TargetLowering.h @@ -2869,6 +2869,12 @@ public: getApproximateEVTForLLT(ToTy, DL, Ctx)); } + /// Return true if truncating the specific node Val to type VT2 is free. + virtual bool isTruncateFree(SDValue Val, EVT VT2) const { + // Fallback to type matching. + return isTruncateFree(Val.getValueType(), VT2); + } + virtual bool isProfitableToHoist(Instruction *I) const { return true; } /// Return true if the extension represented by \p I is free. |