[all-commits] [llvm/llvm-project] a20220: [AlwaysInliner] Call mergeAttributesForInlining af...

weiguozhi via All-commits all-commits at lists.llvm.org
Fri Nov 13 12:02:26 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a20220d25b0129ee10579ccb52e8fd0a4c948809
      https://github.com/llvm/llvm-project/commit/a20220d25b0129ee10579ccb52e8fd0a4c948809
  Author: Guozhi Wei <carrot at google.com>
  Date:   2020-11-13 (Fri, 13 Nov 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/AlwaysInliner.cpp
    A llvm/test/Transforms/Inline/always-inline-attr.ll

  Log Message:
  -----------
  [AlwaysInliner] Call mergeAttributesForInlining after inlining

Like inlineCallIfPossible and InlinerPass, after inlining mergeAttributesForInlining
should be called to merge callee's attributes to caller. But it is not called in
AlwaysInliner, causes caller's attributes inconsistent with inlined code.

Attached test case demonstrates that attribute "min-legal-vector-width"="512" is
not merged into caller without this patch, and it causes failure in SelectionDAG
when lowering the inlined AVX512 intrinsic.

Differential Revision: https://reviews.llvm.org/D91446




More information about the All-commits mailing list