diff options
| author | Alex Zinenko <zinenko@google.com> | 2019-08-09 08:30:13 -0700 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-08-09 08:30:42 -0700 |
| commit | b9ff2dd87edef4a750f2caccbd4923500f3d8405 (patch) | |
| tree | 074b1a6fc2f2e29185c37f2728ec22aa8c516aa8 /mlir/test/Target | |
| parent | 59b473c231f6295bd4aa7199da5816caae5a5e3a (diff) | |
| download | bcm5719-llvm-b9ff2dd87edef4a750f2caccbd4923500f3d8405.tar.gz bcm5719-llvm-b9ff2dd87edef4a750f2caccbd4923500f3d8405.zip | |
Translation to LLVM: support llvm.global
Add support for translating recently introduced llvm.global operations to
global variables in the LLVM IR proper.
PiperOrigin-RevId: 262564700
Diffstat (limited to 'mlir/test/Target')
| -rw-r--r-- | mlir/test/Target/llvmir.mlir | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mlir/test/Target/llvmir.mlir b/mlir/test/Target/llvmir.mlir index ab714cda2d2..6f357abc384 100644 --- a/mlir/test/Target/llvmir.mlir +++ b/mlir/test/Target/llvmir.mlir @@ -1,5 +1,14 @@ // RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s +// CHECK: @i32_global = internal global i32 42 +llvm.global @i32_global(42: i32) : !llvm.i32 + +// CHECK: @i32_global_const = internal constant i53 52 +llvm.global constant @i32_global_const(52: i53) : !llvm.i53 + +// CHECK: @float_global = internal global float 0.000000e+00 +llvm.global @float_global(0.0: f32) : !llvm.float + // // Declarations of the allocation functions to be linked against. // |

