[all-commits] [llvm/llvm-project] 66eedd: [InstCombine] Fix worklist management in select fo...

hanbeom via All-commits all-commits at lists.llvm.org
Thu Jan 11 00:34:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 66eedd1dd370d22ddf994540c20848618d64d1a6
      https://github.com/llvm/llvm-project/commit/66eedd1dd370d22ddf994540c20848618d64d1a6
  Author: hanbeom <kese111 at gmail.com>
  Date:   2024-01-11 (Thu, 11 Jan 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/select.ll

  Log Message:
  -----------
  [InstCombine] Fix worklist management in select fold (#77738)

`InstCombine` uses `Worklist` to manage change history. `setOperand`,
which was previously used to change the `Select` Instruction, does not,
so it is `run` twice, which causes an `LLVM ERROR`.

This problem is resolved by changing `setOperand` to `replaceOperand` as
the change history will be registered in the Worklist.

Fixes #77553.




More information about the All-commits mailing list