11// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2- // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -disable-O0-optnone -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck %s
3- // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -disable-O0-optnone -DPOLYMORPHIC -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck %s
2+ // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -disable-O0-optnone -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck %s --check-prefixes=CHECK,CHECK-NOSTRICT
3+ // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -disable-O0-optnone -DPOLYMORPHIC -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck %s --check-prefixes=CHECK,CHECK-NOSTRICT
4+ // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -disable-O0-optnone -frounding-math -fexperimental-strict-floating-point -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck %s --check-prefixes=CHECK,CHECK-STRICT
5+ // RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -disable-O0-optnone -frounding-math -fexperimental-strict-floating-point -DPOLYMORPHIC -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck %s --check-prefixes=CHECK,CHECK-STRICT
46
57// REQUIRES: aarch64-registered-target || arm-registered-target
68
79#include <arm_mve.h>
810
9- // CHECK-LABEL: @test_vmaxnmq_f16(
10- // CHECK-NEXT: entry:
11- // CHECK-NEXT: [[TMP0:%.*]] = call <8 x half> @llvm.maxnum.v8f16(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]])
12- // CHECK-NEXT: ret <8 x half> [[TMP0]]
11+ // CHECK-NOSTRICT-LABEL: @test_vmaxnmq_f16(
12+ // CHECK-NOSTRICT-NEXT: entry:
13+ // CHECK-NOSTRICT-NEXT: [[TMP0:%.*]] = call <8 x half> @llvm.maxnum.v8f16(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]])
14+ // CHECK-NOSTRICT-NEXT: ret <8 x half> [[TMP0]]
15+ //
16+ // CHECK-STRICT-LABEL: @test_vmaxnmq_f16(
17+ // CHECK-STRICT-NEXT: entry:
18+ // CHECK-STRICT-NEXT: [[TMP0:%.*]] = call <8 x half> @llvm.arm.mve.vmaxnm.v8f16(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]]) #[[ATTR2:[0-9]+]]
19+ // CHECK-STRICT-NEXT: ret <8 x half> [[TMP0]]
1320//
1421float16x8_t test_vmaxnmq_f16 (float16x8_t a , float16x8_t b )
1522{
@@ -20,10 +27,15 @@ float16x8_t test_vmaxnmq_f16(float16x8_t a, float16x8_t b)
2027#endif /* POLYMORPHIC */
2128}
2229
23- // CHECK-LABEL: @test_vmaxnmq_f32(
24- // CHECK-NEXT: entry:
25- // CHECK-NEXT: [[TMP0:%.*]] = call <4 x float> @llvm.maxnum.v4f32(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]])
26- // CHECK-NEXT: ret <4 x float> [[TMP0]]
30+ // CHECK-NOSTRICT-LABEL: @test_vmaxnmq_f32(
31+ // CHECK-NOSTRICT-NEXT: entry:
32+ // CHECK-NOSTRICT-NEXT: [[TMP0:%.*]] = call <4 x float> @llvm.maxnum.v4f32(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]])
33+ // CHECK-NOSTRICT-NEXT: ret <4 x float> [[TMP0]]
34+ //
35+ // CHECK-STRICT-LABEL: @test_vmaxnmq_f32(
36+ // CHECK-STRICT-NEXT: entry:
37+ // CHECK-STRICT-NEXT: [[TMP0:%.*]] = call <4 x float> @llvm.arm.mve.vmaxnm.v4f32(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]]) #[[ATTR2]]
38+ // CHECK-STRICT-NEXT: ret <4 x float> [[TMP0]]
2739//
2840float32x4_t test_vmaxnmq_f32 (float32x4_t a , float32x4_t b )
2941{
@@ -34,12 +46,19 @@ float32x4_t test_vmaxnmq_f32(float32x4_t a, float32x4_t b)
3446#endif /* POLYMORPHIC */
3547}
3648
37- // CHECK-LABEL: @test_vmaxnmq_m_f16(
38- // CHECK-NEXT: entry:
39- // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
40- // CHECK-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
41- // CHECK-NEXT: [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.max.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]], i32 0, <8 x i1> [[TMP1]], <8 x half> [[INACTIVE:%.*]])
42- // CHECK-NEXT: ret <8 x half> [[TMP2]]
49+ // CHECK-NOSTRICT-LABEL: @test_vmaxnmq_m_f16(
50+ // CHECK-NOSTRICT-NEXT: entry:
51+ // CHECK-NOSTRICT-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
52+ // CHECK-NOSTRICT-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
53+ // CHECK-NOSTRICT-NEXT: [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.max.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]], i32 0, <8 x i1> [[TMP1]], <8 x half> [[INACTIVE:%.*]])
54+ // CHECK-NOSTRICT-NEXT: ret <8 x half> [[TMP2]]
55+ //
56+ // CHECK-STRICT-LABEL: @test_vmaxnmq_m_f16(
57+ // CHECK-STRICT-NEXT: entry:
58+ // CHECK-STRICT-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
59+ // CHECK-STRICT-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]]) #[[ATTR2]]
60+ // CHECK-STRICT-NEXT: [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.max.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]], i32 0, <8 x i1> [[TMP1]], <8 x half> [[INACTIVE:%.*]]) #[[ATTR2]]
61+ // CHECK-STRICT-NEXT: ret <8 x half> [[TMP2]]
4362//
4463float16x8_t test_vmaxnmq_m_f16 (float16x8_t inactive , float16x8_t a , float16x8_t b , mve_pred16_t p )
4564{
@@ -50,12 +69,19 @@ float16x8_t test_vmaxnmq_m_f16(float16x8_t inactive, float16x8_t a, float16x8_t
5069#endif /* POLYMORPHIC */
5170}
5271
53- // CHECK-LABEL: @test_vmaxnmq_m_f32(
54- // CHECK-NEXT: entry:
55- // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
56- // CHECK-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
57- // CHECK-NEXT: [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.max.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]], i32 0, <4 x i1> [[TMP1]], <4 x float> [[INACTIVE:%.*]])
58- // CHECK-NEXT: ret <4 x float> [[TMP2]]
72+ // CHECK-NOSTRICT-LABEL: @test_vmaxnmq_m_f32(
73+ // CHECK-NOSTRICT-NEXT: entry:
74+ // CHECK-NOSTRICT-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
75+ // CHECK-NOSTRICT-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
76+ // CHECK-NOSTRICT-NEXT: [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.max.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]], i32 0, <4 x i1> [[TMP1]], <4 x float> [[INACTIVE:%.*]])
77+ // CHECK-NOSTRICT-NEXT: ret <4 x float> [[TMP2]]
78+ //
79+ // CHECK-STRICT-LABEL: @test_vmaxnmq_m_f32(
80+ // CHECK-STRICT-NEXT: entry:
81+ // CHECK-STRICT-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
82+ // CHECK-STRICT-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]]) #[[ATTR2]]
83+ // CHECK-STRICT-NEXT: [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.max.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]], i32 0, <4 x i1> [[TMP1]], <4 x float> [[INACTIVE:%.*]]) #[[ATTR2]]
84+ // CHECK-STRICT-NEXT: ret <4 x float> [[TMP2]]
5985//
6086float32x4_t test_vmaxnmq_m_f32 (float32x4_t inactive , float32x4_t a , float32x4_t b , mve_pred16_t p )
6187{
@@ -66,12 +92,19 @@ float32x4_t test_vmaxnmq_m_f32(float32x4_t inactive, float32x4_t a, float32x4_t
6692#endif /* POLYMORPHIC */
6793}
6894
69- // CHECK-LABEL: @test_vmaxnmq_x_f16(
70- // CHECK-NEXT: entry:
71- // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
72- // CHECK-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
73- // CHECK-NEXT: [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.max.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]], i32 0, <8 x i1> [[TMP1]], <8 x half> undef)
74- // CHECK-NEXT: ret <8 x half> [[TMP2]]
95+ // CHECK-NOSTRICT-LABEL: @test_vmaxnmq_x_f16(
96+ // CHECK-NOSTRICT-NEXT: entry:
97+ // CHECK-NOSTRICT-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
98+ // CHECK-NOSTRICT-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])
99+ // CHECK-NOSTRICT-NEXT: [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.max.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]], i32 0, <8 x i1> [[TMP1]], <8 x half> undef)
100+ // CHECK-NOSTRICT-NEXT: ret <8 x half> [[TMP2]]
101+ //
102+ // CHECK-STRICT-LABEL: @test_vmaxnmq_x_f16(
103+ // CHECK-STRICT-NEXT: entry:
104+ // CHECK-STRICT-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
105+ // CHECK-STRICT-NEXT: [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]]) #[[ATTR2]]
106+ // CHECK-STRICT-NEXT: [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.max.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]], i32 0, <8 x i1> [[TMP1]], <8 x half> undef) #[[ATTR2]]
107+ // CHECK-STRICT-NEXT: ret <8 x half> [[TMP2]]
75108//
76109float16x8_t test_vmaxnmq_x_f16 (float16x8_t a , float16x8_t b , mve_pred16_t p )
77110{
@@ -82,12 +115,19 @@ float16x8_t test_vmaxnmq_x_f16(float16x8_t a, float16x8_t b, mve_pred16_t p)
82115#endif /* POLYMORPHIC */
83116}
84117
85- // CHECK-LABEL: @test_vmaxnmq_x_f32(
86- // CHECK-NEXT: entry:
87- // CHECK-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
88- // CHECK-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
89- // CHECK-NEXT: [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.max.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]], i32 0, <4 x i1> [[TMP1]], <4 x float> undef)
90- // CHECK-NEXT: ret <4 x float> [[TMP2]]
118+ // CHECK-NOSTRICT-LABEL: @test_vmaxnmq_x_f32(
119+ // CHECK-NOSTRICT-NEXT: entry:
120+ // CHECK-NOSTRICT-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
121+ // CHECK-NOSTRICT-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])
122+ // CHECK-NOSTRICT-NEXT: [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.max.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]], i32 0, <4 x i1> [[TMP1]], <4 x float> undef)
123+ // CHECK-NOSTRICT-NEXT: ret <4 x float> [[TMP2]]
124+ //
125+ // CHECK-STRICT-LABEL: @test_vmaxnmq_x_f32(
126+ // CHECK-STRICT-NEXT: entry:
127+ // CHECK-STRICT-NEXT: [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32
128+ // CHECK-STRICT-NEXT: [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]]) #[[ATTR2]]
129+ // CHECK-STRICT-NEXT: [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.max.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]], i32 0, <4 x i1> [[TMP1]], <4 x float> undef) #[[ATTR2]]
130+ // CHECK-STRICT-NEXT: ret <4 x float> [[TMP2]]
91131//
92132float32x4_t test_vmaxnmq_x_f32 (float32x4_t a , float32x4_t b , mve_pred16_t p )
93133{
@@ -97,3 +137,5 @@ float32x4_t test_vmaxnmq_x_f32(float32x4_t a, float32x4_t b, mve_pred16_t p)
97137 return vmaxnmq_x_f32 (a , b , p );
98138#endif /* POLYMORPHIC */
99139}
140+ //// NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
141+ // CHECK: {{.*}}
0 commit comments