[llvm] [llvm] Ensure that soft float targets don't use float/vector code for memops. (PR #107022)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Mon May 5 03:40:52 PDT 2025


================
@@ -1440,9 +1440,11 @@ bool SystemZTargetLowering::findOptimalMemOpLowering(
                                                   SrcAS, FuncAttributes);
 }
 
-EVT SystemZTargetLowering::getOptimalMemOpType(const MemOp &Op,
-                                   const AttributeList &FuncAttributes) const {
-  return Subtarget.hasVector() ? MVT::v2i64 : MVT::Other;
+EVT SystemZTargetLowering::getOptimalMemOpType(
+    const MemOp &Op, const AttributeList &FuncAttributes) const {
+  return Subtarget.hasVector() && !useIntScalarMemOps(FuncAttributes)
----------------
uweigand wrote:

Not sure why this is necessary.  This is supposed to handled once and for all in `SystemZSubtarget::initializeSubtargetDependencies` by switching off the vector facility completely for soft-float:
```
  // -msoft-float implies -mno-vx.
  if (HasSoftFloat)
    HasVector = false;
```


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


More information about the llvm-commits mailing list