[all-commits] [llvm/llvm-project] fa6323: [InstCombine] Add test for iterator invalidation b...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jan 14 11:38:39 PST 2020


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

  Changed paths:
    A llvm/test/Transforms/InstCombine/bitcast-phi-uselistorder.ll

  Log Message:
  -----------
  [InstCombine] Add test for iterator invalidation bug; NFC


  Commit: 652cd7c1007aa5a13ad9864fadc939c5710c5199
      https://github.com/llvm/llvm-project/commit/652cd7c1007aa5a13ad9864fadc939c5710c5199
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/test/Transforms/InstCombine/bitcast-phi-uselistorder.ll

  Log Message:
  -----------
  [InstCombine] Fix user iterator invalidation in bitcast of phi transform

This fixes the issue encountered in D71164. Instead of using a
range-based for, manually iterate over the users and advance the
iterator beforehand, so we do not skip any users due to iterator
invalidation.

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


Compare: https://github.com/llvm/llvm-project/compare/2a43688a0a07...652cd7c1007a


More information about the All-commits mailing list