[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / arm-mfp8.c
blobbf91066335a25c46e1f70068b2c089f00e541018
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
2 // RUN: %clang_cc1 -emit-llvm -triple aarch64-arm-none-eabi -target-feature -fp8 -target-feature +neon -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-C
3 // RUN: %clang_cc1 -emit-llvm -triple aarch64-arm-none-eabi -target-feature -fp8 -target-feature +neon -o - -x c++ %s | FileCheck %s --check-prefixes=CHECK,CHECK-CXX
5 // REQUIRES: aarch64-registered-target
8 #include <arm_neon.h>
10 // CHECK-C-LABEL: define dso_local <16 x i8> @test_ret_mfloat8x16_t(
11 // CHECK-C-SAME: <16 x i8> [[V:%.*]]) #[[ATTR0:[0-9]+]] {
12 // CHECK-C-NEXT: [[ENTRY:.*:]]
13 // CHECK-C-NEXT: [[V_ADDR:%.*]] = alloca <16 x i8>, align 16
14 // CHECK-C-NEXT: store <16 x i8> [[V]], ptr [[V_ADDR]], align 16
15 // CHECK-C-NEXT: [[TMP0:%.*]] = load <16 x i8>, ptr [[V_ADDR]], align 16
16 // CHECK-C-NEXT: ret <16 x i8> [[TMP0]]
18 // CHECK-CXX-LABEL: define dso_local <16 x i8> @_Z21test_ret_mfloat8x16_tu14__MFloat8x16_t(
19 // CHECK-CXX-SAME: <16 x i8> [[V:%.*]]) #[[ATTR0:[0-9]+]] {
20 // CHECK-CXX-NEXT: [[ENTRY:.*:]]
21 // CHECK-CXX-NEXT: [[V_ADDR:%.*]] = alloca <16 x i8>, align 16
22 // CHECK-CXX-NEXT: store <16 x i8> [[V]], ptr [[V_ADDR]], align 16
23 // CHECK-CXX-NEXT: [[TMP0:%.*]] = load <16 x i8>, ptr [[V_ADDR]], align 16
24 // CHECK-CXX-NEXT: ret <16 x i8> [[TMP0]]
26 mfloat8x16_t test_ret_mfloat8x16_t(mfloat8x16_t v) {
27 return v;
30 // CHECK-C-LABEL: define dso_local <8 x i8> @test_ret_mfloat8x8_t(
31 // CHECK-C-SAME: <8 x i8> [[V:%.*]]) #[[ATTR0]] {
32 // CHECK-C-NEXT: [[ENTRY:.*:]]
33 // CHECK-C-NEXT: [[V_ADDR:%.*]] = alloca <8 x i8>, align 8
34 // CHECK-C-NEXT: store <8 x i8> [[V]], ptr [[V_ADDR]], align 8
35 // CHECK-C-NEXT: [[TMP0:%.*]] = load <8 x i8>, ptr [[V_ADDR]], align 8
36 // CHECK-C-NEXT: ret <8 x i8> [[TMP0]]
38 // CHECK-CXX-LABEL: define dso_local <8 x i8> @_Z20test_ret_mfloat8x8_tu13__MFloat8x8_t(
39 // CHECK-CXX-SAME: <8 x i8> [[V:%.*]]) #[[ATTR0]] {
40 // CHECK-CXX-NEXT: [[ENTRY:.*:]]
41 // CHECK-CXX-NEXT: [[V_ADDR:%.*]] = alloca <8 x i8>, align 8
42 // CHECK-CXX-NEXT: store <8 x i8> [[V]], ptr [[V_ADDR]], align 8
43 // CHECK-CXX-NEXT: [[TMP0:%.*]] = load <8 x i8>, ptr [[V_ADDR]], align 8
44 // CHECK-CXX-NEXT: ret <8 x i8> [[TMP0]]
46 mfloat8x8_t test_ret_mfloat8x8_t(mfloat8x8_t v) {
47 return v;
50 // CHECK-C-LABEL: define dso_local <1 x i8> @func1n(
51 // CHECK-C-SAME: <1 x i8> [[MFP8:%.*]]) #[[ATTR0]] {
52 // CHECK-C-NEXT: [[ENTRY:.*:]]
53 // CHECK-C-NEXT: [[MFP8_ADDR:%.*]] = alloca <1 x i8>, align 1
54 // CHECK-C-NEXT: [[F1N:%.*]] = alloca [10 x <1 x i8>], align 1
55 // CHECK-C-NEXT: store <1 x i8> [[MFP8]], ptr [[MFP8_ADDR]], align 1
56 // CHECK-C-NEXT: [[TMP0:%.*]] = load <1 x i8>, ptr [[MFP8_ADDR]], align 1
57 // CHECK-C-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x <1 x i8>], ptr [[F1N]], i64 0, i64 2
58 // CHECK-C-NEXT: store <1 x i8> [[TMP0]], ptr [[ARRAYIDX]], align 1
59 // CHECK-C-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [10 x <1 x i8>], ptr [[F1N]], i64 0, i64 2
60 // CHECK-C-NEXT: [[TMP1:%.*]] = load <1 x i8>, ptr [[ARRAYIDX1]], align 1
61 // CHECK-C-NEXT: ret <1 x i8> [[TMP1]]
63 // CHECK-CXX-LABEL: define dso_local <1 x i8> @_Z6func1nu6__mfp8(
64 // CHECK-CXX-SAME: <1 x i8> [[MFP8:%.*]]) #[[ATTR0]] {
65 // CHECK-CXX-NEXT: [[ENTRY:.*:]]
66 // CHECK-CXX-NEXT: [[MFP8_ADDR:%.*]] = alloca <1 x i8>, align 1
67 // CHECK-CXX-NEXT: [[F1N:%.*]] = alloca [10 x <1 x i8>], align 1
68 // CHECK-CXX-NEXT: store <1 x i8> [[MFP8]], ptr [[MFP8_ADDR]], align 1
69 // CHECK-CXX-NEXT: [[TMP0:%.*]] = load <1 x i8>, ptr [[MFP8_ADDR]], align 1
70 // CHECK-CXX-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x <1 x i8>], ptr [[F1N]], i64 0, i64 2
71 // CHECK-CXX-NEXT: store <1 x i8> [[TMP0]], ptr [[ARRAYIDX]], align 1
72 // CHECK-CXX-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds [10 x <1 x i8>], ptr [[F1N]], i64 0, i64 2
73 // CHECK-CXX-NEXT: [[TMP1:%.*]] = load <1 x i8>, ptr [[ARRAYIDX1]], align 1
74 // CHECK-CXX-NEXT: ret <1 x i8> [[TMP1]]
76 __mfp8 func1n(__mfp8 mfp8) {
77 __mfp8 f1n[10];
78 f1n[2] = mfp8;
79 return f1n[2];
84 //// NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
85 // CHECK: {{.*}}