brintos

brintos / llvm-project-archived public Read only

0
0
Text · 587 B · 20b376f Raw
16 lines · plain
1; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_20 | FileCheck %s2; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 | %ptxas-verify %}3 4target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"5target triple = "nvptx-nvidia-cuda"6 7@global_cst = private constant [6 x i1] [i1 true, i1 false, i1 true, i1 false, i1 true, i1 false]8 9; CHECK: .global .align 1 .b8 global_cst[6] = {1, 0, 1, 0, 1}10define ptx_kernel void @kernel(i32 %i, ptr %out) {11  %5 = getelementptr inbounds i1, ptr @global_cst, i32 %i12  %6 = load i1, ptr %5, align 113  store i1 %6, ptr %out, align 114  ret void15}16