brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 8b9f3a2 Raw
24 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals2// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -target-cpu sm_61 -emit-llvm %s -o - | FileCheck %s3 4// CHECK: Function Attrs: convergent noinline nounwind optnone5// CHECK-LABEL: define {{[^@]+}}@foo6// CHECK-SAME: (ptr noundef [[RET:%.*]]) #[[ATTR0:[0-9]+]] {7// CHECK-NEXT:  entry:8// CHECK-NEXT:    [[RET_ADDR:%.*]] = alloca ptr, align 89// CHECK-NEXT:    store ptr [[RET]], ptr [[RET_ADDR]], align 810// CHECK-NEXT:    [[TMP0:%.*]] = load ptr, ptr [[RET_ADDR]], align 811// CHECK-NEXT:    store i32 1, ptr [[TMP0]], align 412// CHECK-NEXT:    ret void13//14__attribute__((nvptx_kernel)) void foo(int *ret) {15  *ret = 1;16}17 18//.19// CHECK: attributes #[[ATTR0]] = { convergent noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="sm_61" "target-features"="+ptx32,+sm_61" }20//.21// CHECK: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}22// CHECK: [[META1:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}23//.24