Skip to content

[ValueTracking][NFC] Simplify binops in canCreateUndefOrPoison switch #139906

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

Conversation

c-rhodes
Copy link
Collaborator

Already handled by default case.

@c-rhodes c-rhodes requested a review from nikic as a code owner May 14, 2025 14:25
@llvmbot
Copy link
Member

llvmbot commented May 14, 2025

@llvm/pr-subscribers-llvm-analysis

Author: Cullen Rhodes (c-rhodes)

Changes

Already handled by default case.


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

1 Files Affected:

  • (modified) llvm/lib/Analysis/ValueTracking.cpp (-7)
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 3d403531cea2f..fa4054c7a81fd 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -7774,18 +7774,11 @@ static bool canCreateUndefOrPoison(const Operator *Op, UndefPoisonKind Kind,
   case Instruction::FNeg:
   case Instruction::PHI:
   case Instruction::Select:
-  case Instruction::URem:
-  case Instruction::SRem:
   case Instruction::ExtractValue:
   case Instruction::InsertValue:
   case Instruction::Freeze:
   case Instruction::ICmp:
   case Instruction::FCmp:
-  case Instruction::FAdd:
-  case Instruction::FSub:
-  case Instruction::FMul:
-  case Instruction::FDiv:
-  case Instruction::FRem:
     return false;
   case Instruction::GetElementPtr:
     // inbounds is handled above

@c-rhodes c-rhodes force-pushed the value-tracking-nfc-drop-simplify-binops branch from 1ddef8e to 30ce72e Compare May 16, 2025 06:32
@c-rhodes
Copy link
Collaborator Author

c-rhodes commented Jun 2, 2025

ping

@c-rhodes c-rhodes merged commit b9fa1df into llvm:main Jun 2, 2025
11 checks passed
@c-rhodes c-rhodes deleted the value-tracking-nfc-drop-simplify-binops branch June 2, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants