brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · d101d8d Raw
27 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 42; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds < %s 2>&1 | FileCheck %s3; RUN: opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds < %s 2>&1 | FileCheck %s4 5; This looks like a partially lowered module, but the non-lowered GV isn't used by any kernels.6; In such cases, LowerModuleLDS is free to leave it in and ignore it, and we want to make sure7; LowerModuleLDS doesn't crash if it re-runs on such modules.8@notLowered = addrspace(3) global i32 poison9@lowered = addrspace(3) global i32 poison, !absolute_symbol !010 11@llvm.compiler.used = appending addrspace(1) global [1 x ptr] [ptr addrspacecast (ptr addrspace(3) @notLowered to ptr)], section "llvm.metadata"12 13define amdgpu_kernel void @kern(i32 %val0) {14; CHECK-LABEL: define amdgpu_kernel void @kern(15; CHECK-SAME: i32 [[VAL0:%.*]]) {16; CHECK-NEXT:    [[VAL1:%.*]] = add i32 [[VAL0]], 417; CHECK-NEXT:    store i32 [[VAL1]], ptr addrspace(3) @lowered, align 418; CHECK-NEXT:    ret void19;20  %val1 = add i32 %val0, 421  store i32 %val1, ptr addrspace(3) @lowered22  ret void23}24 25 26!0 = !{i32 0, i32 1}27