[all-commits] [llvm/llvm-project] 1a3714: [SCEV] Match both (-1)b + a and a + (-1)b as a - b...

Philip Reames via All-commits all-commits at lists.llvm.org
Wed Mar 6 15:57:57 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1a37147af5a91635e3982a9cbbdfe1d7492af84c
      https://github.com/llvm/llvm-project/commit/1a37147af5a91635e3982a9cbbdfe1d7492af84c
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-03-06 (Wed, 06 Mar 2024)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/trip-count.ll

  Log Message:
  -----------
  [SCEV] Match both (-1)b + a and a + (-1)b as a - b (#84247)

In our analysis of guarding conditions, we were converting a-b == 0 into
a == b alternate form, but we were only checking for one of the two
forms for the sub. There's no requirement that the multiply only be on
the LHS of the add.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list