File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -3285,6 +3285,14 @@ bool NVPTXTargetLowering::splitValueIntoRegisterParts(
32853285 return false ;
32863286}
32873287
3288+ bool llvm::NVPTXTargetLowering::isTruncateFree (EVT FromVT, EVT ToVT) const {
3289+ return (FromVT.getSimpleVT () == MVT::i64 && ToVT.getSimpleVT () == MVT::i32 );
3290+ }
3291+
3292+ bool llvm::NVPTXTargetLowering::isZExtFree (EVT FromVT, EVT ToVT) const {
3293+ return (FromVT.getSimpleVT () == MVT::i32 && ToVT.getSimpleVT () == MVT::i64 );
3294+ }
3295+
32883296// This creates target external symbol for a function parameter.
32893297// Name of the symbol is composed from its index and the function name.
32903298// Negative index corresponds to special parameter (unsized array) used for
Original file line number Diff line number Diff line change @@ -612,6 +612,10 @@ class NVPTXTargetLowering : public TargetLowering {
612612 return true ;
613613 }
614614
615+ bool isTruncateFree (EVT FromVT, EVT ToVT) const override ;
616+
617+ bool isZExtFree (EVT FromVT, EVT ToVT) const override ;
618+
615619private:
616620 const NVPTXSubtarget &STI; // cache the subtarget here
617621 SDValue getParamSymbol (SelectionDAG &DAG, int idx, EVT) const ;
You can’t perform that action at this time.
0 commit comments