[all-commits] [llvm/llvm-project] 51fecd: [InstCombine] Don't combine PHI before catchswitch

Heejin Ahn via All-commits all-commits at lists.llvm.org
Fri Jul 2 12:11:27 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51fecd17bbe04ccf1551132b5fffac43139c7af8
      https://github.com/llvm/llvm-project/commit/51fecd17bbe04ccf1551132b5fffac43139c7af8
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2021-07-02 (Fri, 02 Jul 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
    A llvm/test/Transforms/InstCombine/catchswitch-phi.ll

  Log Message:
  -----------
  [InstCombine] Don't combine PHI before catchswitch

This tries to bail out if the PHI is in a `catchswitch` BB in
InstCombine. A PHI cannot be combined into a non-PHI instruction if it
is in a `catchswitch` BB, because `catchswitch` BB cannot have any
non-PHI instruction other than `catchswitch` itself.

The given test case started crashing after D98058.

Reviewed By: lebedev.ri, rnk

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




More information about the All-commits mailing list