Skip to content

Commit 187fd85

Browse files
committed
Remove unneeded check
1 parent e8486db commit 187fd85

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,9 +901,7 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
901901
assert(e->getOpcode() == BO_EQ || e->getOpcode() == BO_NE);
902902

903903
BinOpInfo boInfo = emitBinOps(e);
904-
cir::CmpOpKind opKind =
905-
e->getOpcode() == BO_EQ ? cir::CmpOpKind::eq : cir::CmpOpKind::ne;
906-
result = builder.create<cir::CmpOp>(loc, opKind, boInfo.lhs, boInfo.rhs);
904+
result = builder.create<cir::CmpOp>(loc, kind, boInfo.lhs, boInfo.rhs);
907905
}
908906

909907
return emitScalarConversion(result, cgf.getContext().BoolTy, e->getType(),

0 commit comments

Comments
 (0)