Skip to content

[ValueTracking][NFC] Drop outdated TODO in canCreateUndefOrPoison #139915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 15, 2025

Conversation

c-rhodes
Copy link
Collaborator

The inrange constexpr GEP case is handled since 425cbbc.

The inrange constexpr GEP case is handled since 425cbbc.
@c-rhodes c-rhodes requested a review from preames May 14, 2025 14:48
@c-rhodes c-rhodes requested a review from nikic as a code owner May 14, 2025 14:48
@llvmbot llvmbot added the llvm:analysis Includes value tracking, cost tables and constant folding label May 14, 2025
@llvmbot
Copy link
Member

llvmbot commented May 14, 2025

@llvm/pr-subscribers-llvm-analysis

Author: Cullen Rhodes (c-rhodes)

Changes

The inrange constexpr GEP case is handled since 425cbbc.


Full diff: https://github.com/llvm/llvm-project/pull/139915.diff

1 Files Affected:

  • (modified) llvm/lib/Analysis/ValueTracking.cpp (-2)
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 3d403531cea2f..e5203baac39b7 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -7788,8 +7788,6 @@ static bool canCreateUndefOrPoison(const Operator *Op, UndefPoisonKind Kind,
   case Instruction::FRem:
     return false;
   case Instruction::GetElementPtr:
-    // inbounds is handled above
-    // TODO: what about inrange on constexpr?
     return false;
   default: {
     const auto *CE = dyn_cast<ConstantExpr>(Op);

Copy link
Contributor

@fhahn fhahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@c-rhodes c-rhodes merged commit 059b0c2 into llvm:main May 15, 2025
8 of 11 checks passed
TIFitis pushed a commit to TIFitis/llvm-project that referenced this pull request May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:analysis Includes value tracking, cost tables and constant folding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants