[clang] [CIR][NFC] Remove unnecessary call to clangCmpToCIRCmp (PR #184217)

Amr Hesham via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 12:08:55 PST 2026


https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/184217

Remove unnecessary call to clangCmpToCIRCmp and use the result from the previous call L1165

>From 0e71528413ad9a359c311ae2aaf925207e3fcb65 Mon Sep 17 00:00:00 2001
From: Amr Hesham <amr96 at programmer.net>
Date: Mon, 2 Mar 2026 21:06:51 +0100
Subject: [PATCH] [CIR][NFC] Remove unnecessary call to clangCmpToCIRCmp

---
 clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp b/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
index 03c8369753f35..5e0c8882a9bfd 100644
--- a/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
@@ -1197,8 +1197,6 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
             mlir::isa<cir::PointerType>(rhs.getType())) {
           cgf.cgm.errorNYI(loc, "strict vtable pointer comparisons");
         }
-
-        cir::CmpOpKind kind = clangCmpToCIRCmp(e->getOpcode());
         result = builder.createCompare(loc, kind, lhs, rhs);
       }
     } else {



More information about the cfe-commits mailing list