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

Cullen Rhodes via llvm-commits llvm-commits at lists.llvm.org
Wed May 14 07:25:33 PDT 2025


https://github.com/c-rhodes created https://github.com/llvm/llvm-project/pull/139906

Already handled by default case.

>From 1ddef8e0cfefc17eb43327b053643d2f742a1eea Mon Sep 17 00:00:00 2001
From: Cullen Rhodes <cullen.rhodes at arm.com>
Date: Wed, 14 May 2025 14:07:04 +0000
Subject: [PATCH] [ValueTracking][NFC] Simplify binops in
 canCreateUndefOrPoison switch

Already handled by default case.
---
 llvm/lib/Analysis/ValueTracking.cpp | 7 -------
 1 file changed, 7 deletions(-)

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



More information about the llvm-commits mailing list