[all-commits] [llvm/llvm-project] 14f350: [IndVars] Don't forget value when inferring nowrap...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Jun 4 11:57:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 14f350daf290e9d7f3eef700acf930d8b0887007
      https://github.com/llvm/llvm-project/commit/14f350daf290e9d7f3eef700acf930d8b0887007
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-06-04 (Fri, 04 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyIndVar.cpp

  Log Message:
  -----------
  [IndVars] Don't forget value when inferring nowrap flags

When SimplifyIndVars infers IR nowrap flags from SCEV, this may
happen in two ways: Either nowrap flags were already present in
SCEV and just get transferred to IR. Or zero/sign extension of
addrecs infers additional nowrap flags, and those get transferred
to IR. In the latter case, calling forgetValue() ensures that the
newly inferred nowrap flags get propagated to any other SCEV
expressions based on the addrec. However, the invalidation can
also have a major compile-time effect in some cases. For
https://bugs.llvm.org/show_bug.cgi?id=50384 with n=512 compile-
time drops from 7.1s to 0.8s without this invalidation. At the
same time, removing the invalidation doesn't affect any codegen
in test-suite.

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




More information about the All-commits mailing list