create shr
This commit is contained in:
@@ -950,12 +950,18 @@ void init_triton_ir(py::module &&m) {
|
|||||||
mlir::Value(self.create<mlir::arith::ShLIOp>(loc, unwrap(lhs), unwrap(rhs)))
|
mlir::Value(self.create<mlir::arith::ShLIOp>(loc, unwrap(lhs), unwrap(rhs)))
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
// .def("create_lshr", &ir::builder::create_lshr, ret::reference,
|
.def("create_lshr", [](mlir::OpBuilder &self, MlirValue &lhs, MlirValue &rhs) -> MlirValue {
|
||||||
// py::arg("lhs"), py::arg("rhs"),
|
auto loc = self.getUnknownLoc();
|
||||||
// py::arg("has_nuw")=false, py::arg("has_nsw")=false)
|
return wrap(
|
||||||
// .def("create_ashr", &ir::builder::create_ashr, ret::reference,
|
mlir::Value(self.create<mlir::arith::ShRUIOp>(loc, unwrap(lhs), unwrap(rhs)))
|
||||||
// py::arg("lhs"), py::arg("rhs"),
|
);
|
||||||
// py::arg("has_nuw")=false, py::arg("has_nsw")=false)
|
})
|
||||||
|
.def("create_ashr", [](mlir::OpBuilder &self, MlirValue &lhs, MlirValue &rhs) -> MlirValue {
|
||||||
|
auto loc = self.getUnknownLoc();
|
||||||
|
return wrap(
|
||||||
|
mlir::Value(self.create<mlir::arith::ShRSIOp>(loc, unwrap(lhs), unwrap(rhs)))
|
||||||
|
);
|
||||||
|
})
|
||||||
// GEP
|
// GEP
|
||||||
.def("create_gep", [](mlir::OpBuilder &self, MlirValue &ptr, MlirValue &offset) -> MlirValue {
|
.def("create_gep", [](mlir::OpBuilder &self, MlirValue &ptr, MlirValue &offset) -> MlirValue {
|
||||||
auto loc = self.getUnknownLoc();
|
auto loc = self.getUnknownLoc();
|
||||||
|
Reference in New Issue
Block a user