brintos

brintos / llvm-project-archived public Read only

0
0
Text · 828 B · fb700ad Raw
35 lines · cpp
1// RUN: %clang_cc1 -emit-llvm -triple loongarch64 %s -o - | FileCheck %s2 3// CHECK: @_ZL2v1 ={{.*}} global i32 0, code_model "small"4static int v1 __attribute__((model("normal")));5 6void use1() {7  v1 = 1;8}9 10// CHECK: @v2 ={{.*}} global i32 0, code_model "medium"11int v2 __attribute__((model("medium")));12 13// CHECK: @v3 ={{.*}} global float 0.000000e+00, code_model "large"14float v3 __attribute__((model("extreme")));15 16// CHECK: @_ZL2v4IiE ={{.*}} global i32 0, code_model "medium"17template <typename T>18static T v4 __attribute__((model("medium")));19 20void use2() {21  v4<int> = 1;22}23 24struct S {25  double d;26};27 28// CHECK: @v5 ={{.*}} global {{.*}}, code_model "medium"29S v5 __attribute__((model("medium")));30 31typedef void (*F)();32 33// CHECK: @v6 ={{.*}} global ptr null, code_model "large"34F v6 __attribute__((model("extreme")));35