[all-commits] [llvm/llvm-project] 56c997: [IndVarSimplify] Don't assert that terminator is n...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Jun 9 01:12:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 56c9976d46ba078799f98bc5440f1792edcb71ad
      https://github.com/llvm/llvm-project/commit/56c9976d46ba078799f98bc5440f1792edcb71ad
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
    A llvm/test/Transforms/IndVarSimplify/pr55925.ll

  Log Message:
  -----------
  [IndVarSimplify] Don't assert that terminator is not SCEVable (PR55925)

The IV widening code currently asserts that terminators aren't SCEVable
-- however, this is not the case for invokes with a returned attribute.

As far as I can tell, this assertions is not necessary -- even if we
have a critical edge (the second test case), the trunc gets inserted
in a legal position.

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

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




More information about the All-commits mailing list