https://bugs.llvm.org/show_bug.cgi?id=42852

            Bug ID: 42852
           Summary: ArgumentPromotion may not optimize 'byval' arguments
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedb...@nondot.org
          Reporter: jdoerf...@anl.gov
                CC: llvm-bugs@lists.llvm.org

Test like:
  llvm/test/Transforms/ArgumentPromotion/byval-2.ll
  llvm/test/Transforms/ArgumentPromotion/attrs.ll
show how we do not optimize byvals even if we could. While some of the checking
for argument promotion is impacted by byval, we could be way more aggressive as
the callee basically can have an own copy of the promoted value.

Desired behavior:
In both cases we want the 'byval %X' to be promoted and replaced by a local
allocation which is initialized with the preloaded value of %X.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to