@@ -1138,8 +1138,9 @@ mlir::Value ScalarExprEmitter::emitShl(const BinOpInfo
&ops) {
mlir::isa(ops.lhs.getType()))
cgf.cgm.errorNYI("sanitizers");
- cgf.cgm.errorNYI("shift ops");
- return {};
+ return builder.create(cgf.getLoc(ops.loc),
and
@@ -759,6 +762,46 @@ LogicalResult cir::BinOp::verify() {
return mlir::success();
}
+//===--===//
+// ShiftOp
+//===--===//
+LogicalResult
@@ -12,22 +16,307 @@ void b0(int a, int b) {
x = x | b;
}
-// CHECK: %{{.+}} = cir.binop(mul, %{{.+}}, %{{.+}}) nsw : !s32i
-// CHECK: %{{.+}} = cir.binop(div, %{{.+}}, %{{.+}}) : !s32i
-// CHECK: %{{.+}} = cir.binop(rem, %{{.+}}, %{{.+}}) : !s32i
-// CHECK: %{{.+}} = cir.bi
https://github.com/bcardosolopes requested changes to this pull request.
Looks reasonable to add vector support later for shifts. Because `SelectOp` is
independent of `ShiftOp`, one possibility would have been to split it in two
PRs to land them faster, but wouldn't bother changing for this rou
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/133405
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1117,6 +1117,91 @@ mlir::LogicalResult
CIRToLLVMBinOpLowering::matchAndRewrite(
return mlir::LogicalResult::success();
}
+mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite(
+cir::ShiftOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &rewrit
@@ -759,6 +762,46 @@ LogicalResult cir::BinOp::verify() {
return mlir::success();
}
+//===--===//
+// ShiftOp
+//===--===//
+LogicalResult
mmha wrote:
cc @andykaylor @erichkeane @dkolsen-pgi
https://github.com/llvm/llvm-project/pull/133405
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mmha created https://github.com/llvm/llvm-project/pull/133405
Since SelectOp will only generated by a future pass that transforms a TernaryOp
this only includes the lowering bits.
This patch also improves the testing of the existing binary operators.
>From fc549133df0092c9c2
llvmbot wrote:
@llvm/pr-subscribers-clangir
Author: Morris Hafner (mmha)
Changes
Since SelectOp will only generated by a future pass that transforms a TernaryOp
this only includes the lowering bits.
This patch also improves the testing of the existing binary operators.
---
Patch is 28.
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Morris Hafner (mmha)
Changes
Since SelectOp will only generated by a future pass that transforms a TernaryOp
this only includes the lowering bits.
This patch also improves the testing of the existing binary operators.
---
Patch is 28.28
11 matches
Mail list logo