[llvm] [NVPTX] Don't use stack memory when bitcasting to/from v2i8 (PR #113928)

Justin Fargnoli via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 23:13:23 PDT 2024


================
@@ -2311,6 +2315,47 @@ NVPTXTargetLowering::LowerCONCAT_VECTORS(SDValue Op, SelectionDAG &DAG) const {
   return DAG.getBuildVector(Node->getValueType(0), dl, Ops);
 }
 
+SDValue NVPTXTargetLowering::LowerBITCAST(SDValue Op, SelectionDAG &DAG) const {
+  // Handle bitcasting to/from v2i8 without hitting the default promotion
+  // strategy which goes through stack memory.
+  SDNode *Node = Op.getNode();
+  SDLoc dl(Node);
----------------
justinfargnoli wrote:

`dl` -> `DL`

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


More information about the llvm-commits mailing list