From caf67162742e6be99b3026b741035573cc508bce Mon Sep 17 00:00:00 2001 From: Tim Shen Date: Thu, 7 Jan 2021 09:52:40 -0800 Subject: [PATCH] [XLA/GPU] Add a LLVMIR test for constants. PiperOrigin-RevId: 350582778 Change-Id: I11e9b078fb7a4b51d8cdab0436e9cb8360b7775d --- .../compiler/xla/service/gpu/tests/constant.hlo | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tensorflow/compiler/xla/service/gpu/tests/constant.hlo diff --git a/tensorflow/compiler/xla/service/gpu/tests/constant.hlo b/tensorflow/compiler/xla/service/gpu/tests/constant.hlo new file mode 100644 index 00000000000..55d23a65e4c --- /dev/null +++ b/tensorflow/compiler/xla/service/gpu/tests/constant.hlo @@ -0,0 +1,13 @@ +// RUN: hlo_to_llvm_ir %s | FileCheck %s + +HloModule Test + +ENTRY main { +// CHECK: @buffer_for_a = global [4 x i8] zeroinitializer, align 64 +// CHECK: @buffer_for_b = global [4 x i8] zeroinitializer, align 64 +// CHECK: %{{.*}} = getelementptr inbounds i8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @buffer_for_a, i32 0, i32 0), i32 %{{.*}} +// CHECK: %{{.*}} = getelementptr inbounds i8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @buffer_for_b, i32 0, i32 0), i32 %{{.*}} + a = pred[2, 2]{1,0} constant({{false, true}, {true, false}}) + b = pred[2, 2]{1,0} constant({{false, true}, {false, true}}) + ROOT xor = pred[2, 2]{1, 0} xor(a, b) +}