[clang] [CIR] Use `cir.vec.fcmp` op for logical comparisons (PR #239706)

Amr Hesham via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 10:46:04 PST 2026


================
@@ -3133,6 +3147,12 @@ mlir::Value ScalarExprEmitter::VisitUnaryLNot(const UnaryOperator *e) {
     auto operVecTy = mlir::cast<cir::VectorType>(oper.getType());
     mlir::Value zeroVec = builder.getNullValue(operVecTy, loc);
     auto resultTy = mlir::cast<cir::VectorType>(cgf.convertType(e->getType()));
+    if (cir::isFPOrVectorOfFPType(oper.getType())) {
----------------
AmrDeveloper wrote:

```suggestion
    if (cir::isFPOrVectorOfFPType(operVecTy.getElementType())) {
```

nit: It's already casted as vector type, so we can check element type directly without extra cast

https://github.com/llvm/llvm-project/pull/239706


More information about the cfe-commits mailing list