[llvm] [NVPTX] Use PRMT instruction to lower i16 bswap (PR #168968)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 15:03:25 PST 2025
================
@@ -2570,6 +2574,45 @@ static SDValue lowerTcgen05St(SDValue Op, SelectionDAG &DAG) {
return Tcgen05StNode;
}
+static SDValue lowerBSWAP(SDValue Op, SelectionDAG &DAG) {
+ SDLoc DL(Op);
+ SDValue Src = Op.getOperand(0);
+ EVT VT = Op.getValueType();
+
+ if (VT == MVT::i16) {
----------------
AlexMaclean wrote:
Nit: This might be a bit clearer as a switch.
https://github.com/llvm/llvm-project/pull/168968
More information about the llvm-commits
mailing list