[llvm] [ValueTracking][NFC] Simplify binops in canCreateUndefOrPoison switch (PR #139906)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 14 07:26:05 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Cullen Rhodes (c-rhodes)

<details>
<summary>Changes</summary>

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
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

``````````

</details>


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


More information about the llvm-commits mailing list