[llvm] [SDAG] Only apply sincos/frexp stack slot folding to IR pointers (PR #115346)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 16:06:59 PST 2024


================
@@ -2518,7 +2518,12 @@ bool SelectionDAG::expandMultipleResultFPLibCall(
     SDValue StoreValue = ST->getValue();
     unsigned ResNo = StoreValue.getResNo();
     Type *StoreType = StoreValue.getValueType().getTypeForEVT(Ctx);
-    if (CallRetResNo == ResNo || !ST->isSimple() ||
+    // If the pointer value does not come from the IR, it could come from ABI
+    // lowering and may alias with the arguments of the library call if they are
+    // passed via the stack.
----------------
arsenm wrote:

You shouldn't have to special case CALLSEQ_START. This restriction should be implicitly present in the chain 

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


More information about the llvm-commits mailing list