[clang] [CIR] Support vector of boolean in cir.minus op (PR #217089)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 18 10:47:17 PDT 2026
================
@@ -2051,7 +2051,7 @@ def CIR_DecOp
//===----------------------------------------------------------------------===//
def CIR_MinusOp
- : CIR_UnaryOpWithOverflowFlag<"minus", CIR_AnyIntOrVecOfIntType> {
+ : CIR_UnaryOpWithOverflowFlag<"minus", CIR_AnyIntOrVecOfIntOrBoolType> {
----------------
andykaylor wrote:
This leaves us in the odd situation that this function accepts a vector of bools, but not a single bool. It seems we don't get here with a single bool because clang converts the bool to an integer first, but I don't see any reason that it shouldn't be allowed.
I find myself wondering if we should just be treating `cir.bool` as an integer type for type constraint purposes. @erichkeane What do you think?
https://github.com/llvm/llvm-project/pull/217089
More information about the cfe-commits
mailing list