[all-commits] [llvm/llvm-project] 07efe2: [SCEV] Check correct value for UB (#124302)

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jan 29 00:09:36 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07efe2c18a63423943a4f9d9daeada23601f84c8
      https://github.com/llvm/llvm-project/commit/07efe2c18a63423943a4f9d9daeada23601f84c8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2025-01-29 (Wed, 29 Jan 2025)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/pr123550.ll

  Log Message:
  -----------
  [SCEV] Check correct value for UB (#124302)

This is a followup to #117152. That patch introduced a check for
UB/poison on BEValue. However, the SCEV we're actually going to use is
Shifted. In some cases, it's possible for Shifted to contain UB, while
BEValue doesn't.

In the test case the values are:

BEValue: (-1 * (zext i8 (-83 + ((-83 /u {1,+,1}<%loop>) *
{-1,+,-1}<%loop>)) to i32))<nuw><nsw>
Shifted: (-173 + (-1 * (zext i8 ((-83 /u {0,+,1}<%loop>) *
{0,+,-1}<%loop>) to i32))<nuw><nsw>)<nuw><nsw>

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



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