[clang] [CIR] Add binary operators (PR #132420)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 21 10:27:34 PDT 2025
================
@@ -143,6 +147,114 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
return createCast(loc, cir::CastKind::bitcast, src, newTy);
}
+ mlir::Value createBinop(mlir::Value lhs, cir::BinOpKind kind,
+ const llvm::APInt &rhs) {
+ return create<cir::BinOp>(lhs.getLoc(), lhs.getType(), kind, lhs,
----------------
erichkeane wrote:
Its a shame for readability BinOp's create isnt `LHS`/`Kind`/`RHS`.
https://github.com/llvm/llvm-project/pull/132420
More information about the cfe-commits
mailing list