[llvm-branch-commits] [SPARC] Use op-then-neg instructions when we have VIS3 (PR #135717)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon May 5 01:51:30 PDT 2025


================
@@ -3605,6 +3605,12 @@ bool SparcTargetLowering::useLoadStackGuardNode(const Module &M) const {
   return true;
 }
 
+bool SparcTargetLowering::isFNegFree(EVT VT) const {
+  if (Subtarget->isVIS3())
+    return VT == MVT::f32 || VT == MVT::f64;
+  return false;
+}
----------------
arsenm wrote:

This ideally would be completely separate patch from the patterns. This enables independent combines 

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


More information about the llvm-branch-commits mailing list