[all-commits] [llvm/llvm-project] 81429a: [Attributor][FIX] Do not create UB by introducing ...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Tue Feb 9 11:03:08 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 81429abd83362f4c3eecbed41ebc917ddf26b13f
      https://github.com/llvm/llvm-project/commit/81429abd83362f4c3eecbed41ebc917ddf26b13f
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-02-09 (Tue, 09 Feb 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
    M llvm/test/Transforms/Attributor/align.ll
    M llvm/test/Transforms/Attributor/noundef.ll

  Log Message:
  -----------
  [Attributor][FIX] Do not create UB by introducing a `noundef undef`

This was reported as PR49104. The reproducer uses varargs but the issue
is the same, we know an argument is dead but can't change the signature
for some reason. The PR49104 situation was: We are in an CG-SCC
traversal and we remove all the uses of an argument and proof it thereby
dead. However, if we do not remove the argument, via signature rewrite,
we need to ensure that the `undef` we introduce at the call site doesn't
clash with a `noundef` attribute.




More information about the All-commits mailing list