[XLA/GPU] Add a LLVMIR test for constants.

PiperOrigin-RevId: 350582778
Change-Id: I11e9b078fb7a4b51d8cdab0436e9cb8360b7775d
This commit is contained in:
Tim Shen 2021-01-07 09:52:40 -08:00 committed by TensorFlower Gardener
parent 0cf9bfa4a3
commit caf6716274

View File

@ -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)
}