brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 1b171b7 Raw
59 lines · c
1// RUN: %clang_cc1 -triple loongarch32 -target-feature +lsx -target-feature \2// RUN:   +lasx -emit-llvm %s -o - | FileCheck %s --check-prefix=LA323// RUN: %clang_cc1 -triple loongarch64 -target-feature +lsx -target-feature \4// RUN:   +lasx -emit-llvm %s -o - | FileCheck %s --check-prefix=LA645 6#include <stddef.h>7#include <stdint.h>8 9char *s1 = "1234";10// LA32: @.str{{.*}} ={{.*}} constant [5 x i8] c"1234\00", align 111// LA64: @.str{{.*}} ={{.*}} constant [5 x i8] c"1234\00", align 112 13char *s2 = "12345678abcd";14// LA32: @.str{{.*}} ={{.*}} constant [13 x i8] c"12345678abcd\00", align 115// LA64: @.str{{.*}} ={{.*}} constant [13 x i8] c"12345678abcd\00", align 116 17char *s3 = "123456789012345678901234567890ab";18// LA32: @.str{{.*}} ={{.*}} constant [33 x i8] c"1234{{.*}}ab\00", align 119// LA64: @.str{{.*}} ={{.*}} constant [33 x i8] c"1234{{.*}}ab\00", align 120 21char *s4 = "123456789012345678901234567890123456789012345678901234567890abcdef";22// LA32: @.str{{.*}} ={{.*}} constant [67 x i8] c"1234{{.*}}cdef\00", align 123// LA64: @.str{{.*}} ={{.*}} constant [67 x i8] c"1234{{.*}}cdef\00", align 124 25int8_t a;26// LA32: @a ={{.*}} global i8 0, align 127// LA64: @a ={{.*}} global i8 0, align 128 29int16_t b;30// LA32: @b ={{.*}} global i16 0, align 231// LA64: @b ={{.*}} global i16 0, align 232 33int32_t c;34// LA32: @c ={{.*}} global i32 0, align 435// LA64: @c ={{.*}} global i32 0, align 436 37int64_t d;38// LA32: @d ={{.*}} global i64 0, align 839// LA64: @d ={{.*}} global i64 0, align 840 41intptr_t e;42// LA32: @e ={{.*}} global i32 0, align 443// LA64: @e ={{.*}} global i64 0, align 844 45float f;46// LA32: @f ={{.*}} global float 0.000000e+00, align 447// LA64: @f ={{.*}} global float 0.000000e+00, align 448 49double g;50// LA32: @g ={{.*}} global double 0.000000e+00, align 851// LA64: @g ={{.*}} global double 0.000000e+00, align 852 53struct H {54  int8_t a;55};56struct H h;57// LA32: @h ={{.*}} global %struct.H zeroinitializer, align 158// LA64: @h ={{.*}} global %struct.H zeroinitializer, align 159