[all-commits] [llvm/llvm-project] 04e586: [InstCombine] Fix worklist management when removin...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jan 14 12:50:24 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 04e586151e7987089d760662126e247012431e90
      https://github.com/llvm/llvm-project/commit/04e586151e7987089d760662126e247012431e90
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/call-guard.ll

  Log Message:
  -----------
  [InstCombine] Fix worklist management when removing guard intrinsic

When multiple guard intrinsics are merged into one, currently the
result of eraseInstFromFunction() is returned -- however, this
should only be done if the current instruction is being removed.
In this case we're removing a different instruction and should
instead report that the current one has been modified by returning it.

For this test case, this reduces the number of instcombine iterations
from 5 to 2 (the minimum possible).

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




More information about the All-commits mailing list