[all-commits] [llvm/llvm-project] e10b0e: [ConstraintElimination] Remove over-eager assertion.

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Mar 8 14:02:30 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e10b0ea371a80d059e67b316c082cb1d3b41ec71
      https://github.com/llvm/llvm-project/commit/e10b0ea371a80d059e67b316c082cb1d3b41ec71
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-03-08 (Tue, 08 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    A llvm/test/Transforms/ConstraintElimination/invoke.ll
    A llvm/test/Transforms/ConstraintElimination/switch.ll

  Log Message:
  -----------
  [ConstraintElimination] Remove over-eager assertion.

After moving the CanAdd check in c60cdb44f7ecb4b02ed and using it for
the assume cases as well, the passed in block may not have  a branch
instruction as terminator. This can trigger the assertion. Given the new
use case, it doesn't add value any longer and can be removed.

Fixes https://github.com/llvm/llvm-project/issues/54281




More information about the All-commits mailing list