summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Conversion
diff options
context:
space:
mode:
authorDenis Khalikov <khalikov.denis@huawei.com>2020-01-07 21:40:42 -0500
committerLei Zhang <antiagainst@google.com>2020-01-07 21:45:54 -0500
commit9883b14cd1a4ea2dec8d7ed30df632671f56c69b (patch)
tree1fe789761ab23b8f32a3a692a59193e76d19decf /mlir/lib/Conversion
parentf7ca0c761979f0a06894571245a913cd8e2dbfce (diff)
downloadbcm5719-llvm-9883b14cd1a4ea2dec8d7ed30df632671f56c69b.tar.gz
bcm5719-llvm-9883b14cd1a4ea2dec8d7ed30df632671f56c69b.zip
[mlir][spirv] Add lowering for standard bit ops
Differential Revision: https://reviews.llvm.org/D72205
Diffstat (limited to 'mlir/lib/Conversion')
-rw-r--r--mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td8
1 files changed, 8 insertions, 0 deletions
diff --git a/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td b/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
index fc09cf604fc..77f9305b4a9 100644
--- a/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
+++ b/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
@@ -26,6 +26,14 @@ class UnaryOpPattern<Type type, Op src, Op tgt> :
def : BinaryOpPattern<SPV_Bool, AndOp, SPV_LogicalAndOp>;
def : BinaryOpPattern<SPV_Bool, OrOp, SPV_LogicalOrOp>;
+def : BinaryOpPattern<SPV_Integer, AndOp, SPV_BitwiseAndOp>;
+def : BinaryOpPattern<SPV_Integer, OrOp, SPV_BitwiseOrOp>;
+def : BinaryOpPattern<SPV_Integer, ShiftLeftOp, SPV_ShiftLeftLogicalOp>;
+def : BinaryOpPattern<SPV_Integer, SignedShiftRightOp,
+ SPV_ShiftRightArithmeticOp>;
+def : BinaryOpPattern<SPV_Integer, UnsignedShiftRightOp,
+ SPV_ShiftRightLogicalOp>;
+def : BinaryOpPattern<SPV_Integer, XOrOp, SPV_BitwiseXorOp>;
def : BinaryOpPattern<SPV_Float, AddFOp, SPV_FAddOp>;
def : BinaryOpPattern<SPV_Float, DivFOp, SPV_FDivOp>;
def : BinaryOpPattern<SPV_Float, MulFOp, SPV_FMulOp>;
OpenPOWER on IntegriCloud