[PATCH] D20376: Properly set CLI.NumFixedArgs for mem{set, move, cpy} builtins in SelectionDAG

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 10:31:10 PDT 2016


kparzysz created this revision.
kparzysz added a reviewer: joker.eph.
kparzysz added a subscriber: llvm-commits.
kparzysz set the repository for this revision to rL LLVM.

The NumFixedArgs will be set by the CLI::setCallee function, do not force it to be 0 for these builtins.

Repository:
  rL LLVM

http://reviews.llvm.org/D20376

Files:
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Index: lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -4656,7 +4656,7 @@
                  Dst.getValueType().getTypeForEVT(*getContext()),
                  getExternalSymbol(TLI->getLibcallName(RTLIB::MEMCPY),
                                    TLI->getPointerTy(getDataLayout())),
-                 std::move(Args), 0)
+                 std::move(Args))
       .setDiscardResult()
       .setTailCall(isTailCall);
 
@@ -4717,7 +4717,7 @@
                  Dst.getValueType().getTypeForEVT(*getContext()),
                  getExternalSymbol(TLI->getLibcallName(RTLIB::MEMMOVE),
                                    TLI->getPointerTy(getDataLayout())),
-                 std::move(Args), 0)
+                 std::move(Args))
       .setDiscardResult()
       .setTailCall(isTailCall);
 
@@ -4779,7 +4779,7 @@
                  Dst.getValueType().getTypeForEVT(*getContext()),
                  getExternalSymbol(TLI->getLibcallName(RTLIB::MEMSET),
                                    TLI->getPointerTy(getDataLayout())),
-                 std::move(Args), 0)
+                 std::move(Args))
       .setDiscardResult()
       .setTailCall(isTailCall);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20376.57647.patch
Type: text/x-patch
Size: 1317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160518/21e2d7ab/attachment-0001.bin>


More information about the llvm-commits mailing list