[all-commits] [llvm/llvm-project] 78bd42: [InstCombine] PHI-aware aggregate reconstruction: ...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Tue Aug 18 15:01:33 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 78bd4231bfbf695cc45b651b6c994f047b287bad
      https://github.com/llvm/llvm-project/commit/78bd4231bfbf695cc45b651b6c994f047b287bad
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-08-19 (Wed, 19 Aug 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/test/Transforms/InstCombine/phi-aware-aggregate-reconstruction.ll

  Log Message:
  -----------
  [InstCombine] PHI-aware aggregate reconstruction: properly handle duplicate predecessors

While it may seem like we can just "deduplicate" the case where
some basic block happens to be a predecessor more than once,
which happens for e.g. switches, that is not correct thing to do.
We must actually add a PHI operand for each predecessor.

This was initially reported to me by David Major
as a clang crash during gecko build for android.




More information about the All-commits mailing list