[llvm] [SPARC] Use hardware byteswapper when we have V9 (PR #191720)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 05:45:47 PDT 2026


================
@@ -3218,13 +3255,109 @@ SDValue SparcTargetLowering::PerformBITCASTCombine(SDNode *N,
   return SDValue();
 }
 
+SDValue SparcTargetLowering::PerformBSWAPCombine(SDNode *N,
+                                                 DAGCombinerInfo &DCI) const {
----------------
s-barannikov wrote:

It might make sense to enable these optimizations post-legalize-ops only (see `DCI.isAfterLegalizeDAG()`, to give generic DAGCombiner a chance to fold them with other operations before we convert it to target-specific nodes.


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


More information about the llvm-commits mailing list