[clang] [CIR] Add binary operators (PR #132420)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 21 10:27:35 PDT 2025
================
@@ -26,6 +26,53 @@ using namespace clang::CIRGen;
namespace {
+struct BinOpInfo {
+ mlir::Value lhs;
+ mlir::Value rhs;
+ SourceRange loc;
+ QualType fullType; // Type of operands and result
+ QualType compType; // Type used for computations. Element type
+ // for vectors, otherwise same as FullType.
+ BinaryOperator::Opcode opcode; // Opcode of BinOp to perform
+ FPOptions fpfeatures;
+ const Expr *e; // Entire expr, for error unsupported. May not be binop.
+
+ /// Check if the binop computes a division or a remainder.
+ bool isDivremOp() const {
----------------
erichkeane wrote:
is `Devrem` one word? Else should this be `DevRem` (as in, Dev or Rem?)
https://github.com/llvm/llvm-project/pull/132420
More information about the cfe-commits
mailing list