[llvm] [IR] Remove an unnecessary cast (NFC) (PR #147453)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 7 20:16:59 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/147453
predicate is already of Predicate.
>From eb4f2f05e84dd52e1df27a5b8ee914661c093739 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 6 Jul 2025 20:01:58 -0700
Subject: [PATCH] [IR] Remove an unnecessary cast (NFC)
predicate is already of Predicate.
---
llvm/lib/IR/Instructions.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 3cfee89a1fdf5..9fe79366f9b2f 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -3488,7 +3488,7 @@ CmpInst::CmpInst(Type *ty, OtherOps op, Predicate predicate, Value *LHS,
: Instruction(ty, op, AllocMarker, InsertBefore) {
Op<0>() = LHS;
Op<1>() = RHS;
- setPredicate((Predicate)predicate);
+ setPredicate(predicate);
setName(Name);
if (FlagsSource)
copyIRFlags(FlagsSource);
More information about the llvm-commits
mailing list