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

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 2 02:41:35 PDT 2025


Author: Cullen Rhodes
Date: 2025-06-02T10:41:32+01:00
New Revision: b9fa1dfd38ee75640402fdd0ca3640a51b95a8a3

URL: https://github.com/llvm/llvm-project/commit/b9fa1dfd38ee75640402fdd0ca3640a51b95a8a3
DIFF: https://github.com/llvm/llvm-project/commit/b9fa1dfd38ee75640402fdd0ca3640a51b95a8a3.diff

LOG: [ValueTracking][NFC] Simplify binops in canCreateUndefOrPoison switch (#139906)

Already handled by default case.

Added: 
    

Modified: 
    llvm/lib/Analysis/ValueTracking.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index fc19b2ccf7964..3d8bb6249eaf8 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -7462,18 +7462,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:
   case Instruction::GetElementPtr:
     return false;
   default: {


        


More information about the llvm-commits mailing list