summaryrefslogtreecommitdiffstats
path: root/mlir/test/Dialect/SPIRV/Serialization
diff options
context:
space:
mode:
authorLei Zhang <antiagainst@google.com>2019-08-21 08:17:19 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-08-21 08:17:50 -0700
commit8d18fdf2d3dcd626ee326978ce6fdc948213fb4d (patch)
treeb63785c5afc879c0731ebb6fc9c2280b8c073521 /mlir/test/Dialect/SPIRV/Serialization
parent31cfee60773c6277f652aab5fa1f8f824a551627 (diff)
downloadbcm5719-llvm-8d18fdf2d3dcd626ee326978ce6fdc948213fb4d.tar.gz
bcm5719-llvm-8d18fdf2d3dcd626ee326978ce6fdc948213fb4d.zip
[spirv] Support i1 as bool type
PiperOrigin-RevId: 264612014
Diffstat (limited to 'mlir/test/Dialect/SPIRV/Serialization')
-rw-r--r--mlir/test/Dialect/SPIRV/Serialization/constant.mlir8
1 files changed, 6 insertions, 2 deletions
diff --git a/mlir/test/Dialect/SPIRV/Serialization/constant.mlir b/mlir/test/Dialect/SPIRV/Serialization/constant.mlir
index 1d4d4756f6b..ff422ca0490 100644
--- a/mlir/test/Dialect/SPIRV/Serialization/constant.mlir
+++ b/mlir/test/Dialect/SPIRV/Serialization/constant.mlir
@@ -3,11 +3,15 @@
func @spirv_module() -> () {
spv.module "Logical" "GLSL450" {
// CHECK-LABEL: @bool_const
- func @bool_const() -> (i1) {
+ func @bool_const() -> () {
// CHECK: spv.constant true
%0 = spv.constant true
+ // CHECK: spv.constant false
+ %1 = spv.constant false
- spv.ReturnValue %0 : i1
+ %2 = spv.Variable init(%0): !spv.ptr<i1, Function>
+ %3 = spv.Variable init(%1): !spv.ptr<i1, Function>
+ spv.Return
}
// CHECK-LABEL: @i32_const
OpenPOWER on IntegriCloud