[all-commits] [llvm/llvm-project] f80aaa: [SLP] Simplify eraseInstruction [NFC]

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Mar 25 12:02:09 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f80aaa675f93e01efbb6a814c1ec5c52b25ab4b5
      https://github.com/llvm/llvm-project/commit/f80aaa675f93e01efbb6a814c1ec5c52b25ab4b5
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2022-03-25 (Fri, 25 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

  Log Message:
  -----------
  [SLP] Simplify eraseInstruction [NFC]

This simplifies the implementation of eraseInstruction by moving the odd-replace-users-with-undef handling back to the only caller which uses it.  This handling was not obviously correct, so add the asserts which make it clear why this is safe to do at all.  The result is simpler code and stronger assertions.




More information about the All-commits mailing list