[all-commits] [llvm/llvm-project] dce77a: [IndVars] Preserve flags of narrow IV inc if repla...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Feb 10 10:11:29 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dce77a357948709e335910ddc07f9c3f2eb2ac4b
      https://github.com/llvm/llvm-project/commit/dce77a357948709e335910ddc07f9c3f2eb2ac4b
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-02-10 (Sat, 10 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
    M llvm/test/Transforms/IndVarSimplify/X86/pr27133.ll
    M llvm/test/Transforms/IndVarSimplify/lftr-reuse.ll
    M llvm/test/Transforms/IndVarSimplify/pr30806-phi-scev.ll
    M llvm/test/Transforms/IndVarSimplify/preserve-nsw-during-expansion.ll
    M llvm/test/Transforms/IndVarSimplify/widen-i32-i8ptr.ll
    M llvm/test/Transforms/LoopFlatten/widen-iv.ll
    M llvm/test/Transforms/LoopFlatten/widen-iv2.ll
    M llvm/test/Transforms/LoopFlatten/widen-iv3.ll
    M llvm/test/Transforms/PhaseOrdering/AArch64/indvars-vectorization.ll
    M llvm/test/Transforms/PhaseOrdering/AArch64/loopflatten.ll

  Log Message:
  -----------
  [IndVars] Preserve flags of narrow IV inc if replacing with wider inc. (#80446)

We are replacing a narrow IV increment with a wider one. If the original
(narrow) increment did not wrap, the wider one should not wrap either.
Set the flags to be the union of both wide increment and original
increment; this ensures we preserve flags SCEV could infer for the wider
increment.

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




More information about the All-commits mailing list