[all-commits] [llvm/llvm-project] fa12df: [SCEV] Check correct value for UB (#124302)
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Jan 30 14:10:28 PST 2025
Branch: refs/heads/release/20.x
Home: https://github.com/llvm/llvm-project
Commit: fa12df5e22aa5ae6d3c0a5b261acd15bd49081e8
https://github.com/llvm/llvm-project/commit/fa12df5e22aa5ae6d3c0a5b261acd15bd49081e8
Author: Nikita Popov <npopov at redhat.com>
Date: 2025-01-30 (Thu, 30 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.
(cherry picked from commit 07efe2c18a63423943a4f9d9daeada23601f84c8)
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