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

Alex Rønne Petersen via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 15:33:46 PDT 2024


================
@@ -8846,9 +8846,14 @@ static bool findGISelOptimalMemOpLowering(std::vector<LLT> &MemOps,
   if (Op.isMemcpyWithFixedDstAlign() && Op.getSrcAlign() < Op.getDstAlign())
     return false;
 
-  LLT Ty = TLI.getOptimalMemOpLLT(Op, FuncAttributes);
-
-  if (Ty == LLT()) {
+  bool WantIntScalar = TLI.useSoftFloat() ||
+                       FuncAttributes.hasFnAttr(Attribute::NoImplicitFloat);
----------------
alexrp wrote:

@arsenm ping for clarification on this point:

> Do you mean that you would prefer if I just fixed each `getOptimalMemOpLLT()`/`getOptimalMemOpType()` implementation to check for these attributes when they want to potentially return a float/vector type?

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


More information about the llvm-commits mailing list