|
| 1 | +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 3 |
| 2 | + |
| 3 | +// RUN: %clang_cc1 -DSVE_HEADER -triple aarch64 -target-feature +sve -emit-llvm -O2 -o - %s | opt -S -passes=mem2reg,sroa | FileCheck %s |
| 4 | +// RUN: %clang_cc1 -DSVE_HEADER -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o - /dev/null %s |
| 5 | + |
| 6 | +// RUN: %clang_cc1 -DNEON_HEADER -triple aarch64 -target-feature +sve -emit-llvm -O2 -o - %s | opt -S -passes=mem2reg,sroa | FileCheck %s |
| 7 | +// RUN: %clang_cc1 -DNEON_HEADER -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o - /dev/null %s |
| 8 | + |
| 9 | +// RUN: %clang_cc1 -DSVE_HEADER -DNEON_HEADER -triple aarch64 -target-feature +sve -emit-llvm -O2 -o - %s | opt -S -passes=mem2reg,sroa | FileCheck %s |
| 10 | +// RUN: %clang_cc1 -DSVE_HEADER -DNEON_HEADER -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o - /dev/null %s |
| 11 | + |
| 12 | +// RUN: %clang_cc1 -DNEON_HEADER -DSVE_HEADER2 -triple aarch64 -target-feature +sve -emit-llvm -O2 -o - %s | opt -S -passes=mem2reg,sroa | FileCheck %s |
| 13 | +// RUN: %clang_cc1 -DNEON_HEADER -DSVE_HEADER2 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o - /dev/null %s |
| 14 | + |
| 15 | +#ifdef SVE_HEADER |
| 16 | + #include <arm_sve.h> |
| 17 | +#endif |
| 18 | + |
| 19 | +#ifdef NEON_HEADER |
| 20 | + #include <arm_neon.h> |
| 21 | +#endif |
| 22 | + |
| 23 | +#ifdef SVE_HEADER_2 |
| 24 | + #include <arm_sve.h> |
| 25 | +#endif |
| 26 | + |
| 27 | +// function return types |
| 28 | +// CHECK-LABEL: define dso_local <8 x half> @test_ret_v8f16( |
| 29 | +// CHECK-SAME: <8 x half> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { |
| 30 | +// CHECK-NEXT: entry: |
| 31 | +// CHECK-NEXT: ret <8 x half> [[V]] |
| 32 | +// |
| 33 | +float16x8_t test_ret_v8f16(float16x8_t v) { |
| 34 | + return v; |
| 35 | +} |
| 36 | + |
| 37 | +// CHECK-LABEL: define dso_local <4 x float> @test_ret_v4f32( |
| 38 | +// CHECK-SAME: <4 x float> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 39 | +// CHECK-NEXT: entry: |
| 40 | +// CHECK-NEXT: ret <4 x float> [[V]] |
| 41 | +// |
| 42 | +float32x4_t test_ret_v4f32(float32x4_t v) { |
| 43 | + return v; |
| 44 | +} |
| 45 | + |
| 46 | +// CHECK-LABEL: define dso_local <2 x double> @test_ret_v2f64( |
| 47 | +// CHECK-SAME: <2 x double> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 48 | +// CHECK-NEXT: entry: |
| 49 | +// CHECK-NEXT: ret <2 x double> [[V]] |
| 50 | +// |
| 51 | +float64x2_t test_ret_v2f64(float64x2_t v) { |
| 52 | + return v; |
| 53 | +} |
| 54 | + |
| 55 | +// CHECK-LABEL: define dso_local <8 x bfloat> @test_ret_v8bf16( |
| 56 | +// CHECK-SAME: <8 x bfloat> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 57 | +// CHECK-NEXT: entry: |
| 58 | +// CHECK-NEXT: ret <8 x bfloat> [[V]] |
| 59 | +// |
| 60 | +bfloat16x8_t test_ret_v8bf16(bfloat16x8_t v) { |
| 61 | + return v; |
| 62 | +} |
| 63 | + |
| 64 | +// CHECK-LABEL: define dso_local <16 x i8> @test_ret_v16s8( |
| 65 | +// CHECK-SAME: <16 x i8> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 66 | +// CHECK-NEXT: entry: |
| 67 | +// CHECK-NEXT: ret <16 x i8> [[V]] |
| 68 | +// |
| 69 | +int8x16_t test_ret_v16s8(int8x16_t v) { |
| 70 | + return v; |
| 71 | +} |
| 72 | + |
| 73 | +// CHECK-LABEL: define dso_local <8 x i16> @test_ret_v8s16( |
| 74 | +// CHECK-SAME: <8 x i16> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 75 | +// CHECK-NEXT: entry: |
| 76 | +// CHECK-NEXT: ret <8 x i16> [[V]] |
| 77 | +// |
| 78 | +int16x8_t test_ret_v8s16(int16x8_t v) { |
| 79 | + return v; |
| 80 | +} |
| 81 | + |
| 82 | +// CHECK-LABEL: define dso_local <4 x i32> @test_ret_v32s4( |
| 83 | +// CHECK-SAME: <4 x i32> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 84 | +// CHECK-NEXT: entry: |
| 85 | +// CHECK-NEXT: ret <4 x i32> [[V]] |
| 86 | +// |
| 87 | +int32x4_t test_ret_v32s4(int32x4_t v) { |
| 88 | + return v; |
| 89 | +} |
| 90 | + |
| 91 | +// CHECK-LABEL: define dso_local <2 x i64> @test_ret_v64s2( |
| 92 | +// CHECK-SAME: <2 x i64> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 93 | +// CHECK-NEXT: entry: |
| 94 | +// CHECK-NEXT: ret <2 x i64> [[V]] |
| 95 | +// |
| 96 | +int64x2_t test_ret_v64s2(int64x2_t v) { |
| 97 | + return v; |
| 98 | +} |
| 99 | + |
| 100 | +// CHECK-LABEL: define dso_local <16 x i8> @test_ret_v16u8( |
| 101 | +// CHECK-SAME: <16 x i8> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 102 | +// CHECK-NEXT: entry: |
| 103 | +// CHECK-NEXT: ret <16 x i8> [[V]] |
| 104 | +// |
| 105 | +uint8x16_t test_ret_v16u8(uint8x16_t v) { |
| 106 | + return v; |
| 107 | +} |
| 108 | + |
| 109 | +// CHECK-LABEL: define dso_local <8 x i16> @test_ret_v8u16( |
| 110 | +// CHECK-SAME: <8 x i16> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 111 | +// CHECK-NEXT: entry: |
| 112 | +// CHECK-NEXT: ret <8 x i16> [[V]] |
| 113 | +// |
| 114 | +uint16x8_t test_ret_v8u16(uint16x8_t v) { |
| 115 | + return v; |
| 116 | +} |
| 117 | + |
| 118 | +// CHECK-LABEL: define dso_local <4 x i32> @test_ret_v32u4( |
| 119 | +// CHECK-SAME: <4 x i32> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 120 | +// CHECK-NEXT: entry: |
| 121 | +// CHECK-NEXT: ret <4 x i32> [[V]] |
| 122 | +// |
| 123 | +uint32x4_t test_ret_v32u4(uint32x4_t v) { |
| 124 | + return v; |
| 125 | +} |
| 126 | + |
| 127 | +// CHECK-LABEL: define dso_local <2 x i64> @test_ret_v64u2( |
| 128 | +// CHECK-SAME: <2 x i64> noundef returned [[V:%.*]]) local_unnamed_addr #[[ATTR0]] { |
| 129 | +// CHECK-NEXT: entry: |
| 130 | +// CHECK-NEXT: ret <2 x i64> [[V]] |
| 131 | +// |
| 132 | +uint64x2_t test_ret_v64u2(uint64x2_t v) { |
| 133 | + return v; |
| 134 | +} |
0 commit comments