[all-commits] [llvm/llvm-project] 3512bc: [SCEV] Fix incorrect extension in computeConstantD...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Aug 12 06:25:03 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3512bcc2e9ab06b0ae2cab78744550b515e54184
      https://github.com/llvm/llvm-project/commit/3512bcc2e9ab06b0ae2cab78744550b515e54184
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-08-12 (Mon, 12 Aug 2024)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Transforms/IndVarSimplify/pr102597.ll

  Log Message:
  -----------
  [SCEV] Fix incorrect extension in computeConstantDifference()

The Mul factor was zero-extended here, resulting in incorrect
results for integers larger than 64-bit.

As we currently only multiply by 1 or -1, just split this into
two cases -- there's no need for a full multiplication here.

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



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