brintos

brintos / llvm-project-archived public Read only

0
0
Text · 28.2 KiB · 708502d Raw
541 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py2// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -O0 -disable-O0-optnone -emit-llvm -o - %s | opt -S -passes=sroa | FileCheck %s --check-prefixes=CHECK,CHECK-NONSTRICT3// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -O0 -disable-O0-optnone -DPOLYMORPHIC -emit-llvm -o - %s | opt -S -passes=sroa | FileCheck %s --check-prefixes=CHECK,CHECK-NONSTRICT4// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -O0 -frounding-math -fexperimental-strict-floating-point -disable-O0-optnone -emit-llvm -o - %s | opt -S -passes=sroa | FileCheck %s --check-prefixes=CHECK,CHECK-STRICT5// RUN: %clang_cc1 -triple thumbv8.1m.main-none-none-eabi -target-feature +mve.fp -mfloat-abi hard -O0 -frounding-math -fexperimental-strict-floating-point -disable-O0-optnone -DPOLYMORPHIC -emit-llvm -o - %s | opt -S -passes=sroa | FileCheck %s --check-prefixes=CHECK,CHECK-STRICT6 7// REQUIRES: aarch64-registered-target || arm-registered-target8 9#include <arm_mve.h>10 11// CHECK-LABEL: @test_vmulq_u8(12// CHECK-NEXT:  entry:13// CHECK-NEXT:    [[TMP0:%.*]] = mul <16 x i8> [[A:%.*]], [[B:%.*]]14// CHECK-NEXT:    ret <16 x i8> [[TMP0]]15//16uint8x16_t test_vmulq_u8(uint8x16_t a, uint8x16_t b)17{18#ifdef POLYMORPHIC19    return vmulq(a, b);20#else /* POLYMORPHIC */21    return vmulq_u8(a, b);22#endif /* POLYMORPHIC */23}24 25// CHECK-LABEL: @test_vmulq_s16(26// CHECK-NEXT:  entry:27// CHECK-NEXT:    [[TMP0:%.*]] = mul <8 x i16> [[A:%.*]], [[B:%.*]]28// CHECK-NEXT:    ret <8 x i16> [[TMP0]]29//30int16x8_t test_vmulq_s16(int16x8_t a, int16x8_t b)31{32#ifdef POLYMORPHIC33    return vmulq(a, b);34#else /* POLYMORPHIC */35    return vmulq_s16(a, b);36#endif /* POLYMORPHIC */37}38 39// CHECK-LABEL: @test_vmulq_u32(40// CHECK-NEXT:  entry:41// CHECK-NEXT:    [[TMP0:%.*]] = mul <4 x i32> [[A:%.*]], [[B:%.*]]42// CHECK-NEXT:    ret <4 x i32> [[TMP0]]43//44uint32x4_t test_vmulq_u32(uint32x4_t a, uint32x4_t b)45{46#ifdef POLYMORPHIC47    return vmulq(a, b);48#else /* POLYMORPHIC */49    return vmulq_u32(a, b);50#endif /* POLYMORPHIC */51}52 53// CHECK-NONSTRICT-LABEL: @test_vmulq_f32(54// CHECK-NONSTRICT-NEXT:  entry:55// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = fmul <4 x float> [[A:%.*]], [[B:%.*]]56// CHECK-NONSTRICT-NEXT:    ret <4 x float> [[TMP0]]57//58// CHECK-STRICT-LABEL: @test_vmulq_f32(59// CHECK-STRICT-NEXT:  entry:60// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = call <4 x float> @llvm.arm.mve.vmul.v4f32(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]]) #[[ATTR2:[0-9]+]]61// CHECK-STRICT-NEXT:    ret <4 x float> [[TMP0]]62//63float32x4_t test_vmulq_f32(float32x4_t a, float32x4_t b)64{65#ifdef POLYMORPHIC66    return vmulq(a, b);67#else /* POLYMORPHIC */68    return vmulq_f32(a, b);69#endif /* POLYMORPHIC */70}71 72// CHECK-NONSTRICT-LABEL: @test_vmulq_m_s8(73// CHECK-NONSTRICT-NEXT:  entry:74// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i3275// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])76// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.mul.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])77// CHECK-NONSTRICT-NEXT:    ret <16 x i8> [[TMP2]]78//79// CHECK-STRICT-LABEL: @test_vmulq_m_s8(80// CHECK-STRICT-NEXT:  entry:81// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i3282// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]]) #[[ATTR2]]83// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.mul.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]]) #[[ATTR2]]84// CHECK-STRICT-NEXT:    ret <16 x i8> [[TMP2]]85//86int8x16_t test_vmulq_m_s8(int8x16_t inactive, int8x16_t a, int8x16_t b, mve_pred16_t p)87{88#ifdef POLYMORPHIC89    return vmulq_m(inactive, a, b, p);90#else /* POLYMORPHIC */91    return vmulq_m_s8(inactive, a, b, p);92#endif /* POLYMORPHIC */93}94 95// CHECK-NONSTRICT-LABEL: @test_vmulq_m_u16(96// CHECK-NONSTRICT-NEXT:  entry:97// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i3298// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])99// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.mul.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])100// CHECK-NONSTRICT-NEXT:    ret <8 x i16> [[TMP2]]101//102// CHECK-STRICT-LABEL: @test_vmulq_m_u16(103// CHECK-STRICT-NEXT:  entry:104// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32105// 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 i16> @llvm.arm.mve.mul.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]]) #[[ATTR2]]107// CHECK-STRICT-NEXT:    ret <8 x i16> [[TMP2]]108//109uint16x8_t test_vmulq_m_u16(uint16x8_t inactive, uint16x8_t a, uint16x8_t b, mve_pred16_t p)110{111#ifdef POLYMORPHIC112    return vmulq_m(inactive, a, b, p);113#else /* POLYMORPHIC */114    return vmulq_m_u16(inactive, a, b, p);115#endif /* POLYMORPHIC */116}117 118// CHECK-NONSTRICT-LABEL: @test_vmulq_m_s32(119// CHECK-NONSTRICT-NEXT:  entry:120// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32121// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])122// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.mul.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])123// CHECK-NONSTRICT-NEXT:    ret <4 x i32> [[TMP2]]124//125// CHECK-STRICT-LABEL: @test_vmulq_m_s32(126// CHECK-STRICT-NEXT:  entry:127// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32128// 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 i32> @llvm.arm.mve.mul.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]]) #[[ATTR2]]130// CHECK-STRICT-NEXT:    ret <4 x i32> [[TMP2]]131//132int32x4_t test_vmulq_m_s32(int32x4_t inactive, int32x4_t a, int32x4_t b, mve_pred16_t p)133{134#ifdef POLYMORPHIC135    return vmulq_m(inactive, a, b, p);136#else /* POLYMORPHIC */137    return vmulq_m_s32(inactive, a, b, p);138#endif /* POLYMORPHIC */139}140 141// CHECK-NONSTRICT-LABEL: @test_vmulq_m_f16(142// CHECK-NONSTRICT-NEXT:  entry:143// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32144// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])145// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.mul.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]], <8 x i1> [[TMP1]], <8 x half> [[INACTIVE:%.*]])146// CHECK-NONSTRICT-NEXT:    ret <8 x half> [[TMP2]]147//148// CHECK-STRICT-LABEL: @test_vmulq_m_f16(149// CHECK-STRICT-NEXT:  entry:150// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32151// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]]) #[[ATTR2]]152// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.mul.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[B:%.*]], <8 x i1> [[TMP1]], <8 x half> [[INACTIVE:%.*]]) #[[ATTR2]]153// CHECK-STRICT-NEXT:    ret <8 x half> [[TMP2]]154//155float16x8_t test_vmulq_m_f16(float16x8_t inactive, float16x8_t a, float16x8_t b, mve_pred16_t p)156{157#ifdef POLYMORPHIC158    return vmulq_m(inactive, a, b, p);159#else /* POLYMORPHIC */160    return vmulq_m_f16(inactive, a, b, p);161#endif /* POLYMORPHIC */162}163 164// CHECK-NONSTRICT-LABEL: @test_vmulq_x_u8(165// CHECK-NONSTRICT-NEXT:  entry:166// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32167// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])168// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.mul.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]], <16 x i8> undef)169// CHECK-NONSTRICT-NEXT:    ret <16 x i8> [[TMP2]]170//171// CHECK-STRICT-LABEL: @test_vmulq_x_u8(172// CHECK-STRICT-NEXT:  entry:173// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32174// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]]) #[[ATTR2]]175// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.mul.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[B:%.*]], <16 x i1> [[TMP1]], <16 x i8> undef) #[[ATTR2]]176// CHECK-STRICT-NEXT:    ret <16 x i8> [[TMP2]]177//178uint8x16_t test_vmulq_x_u8(uint8x16_t a, uint8x16_t b, mve_pred16_t p)179{180#ifdef POLYMORPHIC181    return vmulq_x(a, b, p);182#else /* POLYMORPHIC */183    return vmulq_x_u8(a, b, p);184#endif /* POLYMORPHIC */185}186 187// CHECK-NONSTRICT-LABEL: @test_vmulq_x_s16(188// CHECK-NONSTRICT-NEXT:  entry:189// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32190// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])191// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.mul.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]], <8 x i16> undef)192// CHECK-NONSTRICT-NEXT:    ret <8 x i16> [[TMP2]]193//194// CHECK-STRICT-LABEL: @test_vmulq_x_s16(195// CHECK-STRICT-NEXT:  entry:196// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32197// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]]) #[[ATTR2]]198// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.mul.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[B:%.*]], <8 x i1> [[TMP1]], <8 x i16> undef) #[[ATTR2]]199// CHECK-STRICT-NEXT:    ret <8 x i16> [[TMP2]]200//201int16x8_t test_vmulq_x_s16(int16x8_t a, int16x8_t b, mve_pred16_t p)202{203#ifdef POLYMORPHIC204    return vmulq_x(a, b, p);205#else /* POLYMORPHIC */206    return vmulq_x_s16(a, b, p);207#endif /* POLYMORPHIC */208}209 210// CHECK-NONSTRICT-LABEL: @test_vmulq_x_u32(211// CHECK-NONSTRICT-NEXT:  entry:212// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32213// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])214// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.mul.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]], <4 x i32> undef)215// CHECK-NONSTRICT-NEXT:    ret <4 x i32> [[TMP2]]216//217// CHECK-STRICT-LABEL: @test_vmulq_x_u32(218// CHECK-STRICT-NEXT:  entry:219// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32220// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]]) #[[ATTR2]]221// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.mul.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[B:%.*]], <4 x i1> [[TMP1]], <4 x i32> undef) #[[ATTR2]]222// CHECK-STRICT-NEXT:    ret <4 x i32> [[TMP2]]223//224uint32x4_t test_vmulq_x_u32(uint32x4_t a, uint32x4_t b, mve_pred16_t p)225{226#ifdef POLYMORPHIC227    return vmulq_x(a, b, p);228#else /* POLYMORPHIC */229    return vmulq_x_u32(a, b, p);230#endif /* POLYMORPHIC */231}232 233// CHECK-NONSTRICT-LABEL: @test_vmulq_x_f32(234// CHECK-NONSTRICT-NEXT:  entry:235// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32236// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])237// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.mul.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]], <4 x i1> [[TMP1]], <4 x float> undef)238// CHECK-NONSTRICT-NEXT:    ret <4 x float> [[TMP2]]239//240// CHECK-STRICT-LABEL: @test_vmulq_x_f32(241// CHECK-STRICT-NEXT:  entry:242// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32243// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]]) #[[ATTR2]]244// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.mul.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[B:%.*]], <4 x i1> [[TMP1]], <4 x float> undef) #[[ATTR2]]245// CHECK-STRICT-NEXT:    ret <4 x float> [[TMP2]]246//247float32x4_t test_vmulq_x_f32(float32x4_t a, float32x4_t b, mve_pred16_t p)248{249#ifdef POLYMORPHIC250    return vmulq_x(a, b, p);251#else /* POLYMORPHIC */252    return vmulq_x_f32(a, b, p);253#endif /* POLYMORPHIC */254}255 256// CHECK-LABEL: @test_vmulq_n_u8(257// CHECK-NEXT:  entry:258// CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[B:%.*]], i64 0259// CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer260// CHECK-NEXT:    [[TMP0:%.*]] = mul <16 x i8> [[A:%.*]], [[DOTSPLAT]]261// CHECK-NEXT:    ret <16 x i8> [[TMP0]]262//263uint8x16_t test_vmulq_n_u8(uint8x16_t a, uint8_t b)264{265#ifdef POLYMORPHIC266    return vmulq(a, b);267#else /* POLYMORPHIC */268    return vmulq_n_u8(a, b);269#endif /* POLYMORPHIC */270}271 272// CHECK-LABEL: @test_vmulq_n_s16(273// CHECK-NEXT:  entry:274// CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[B:%.*]], i64 0275// CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer276// CHECK-NEXT:    [[TMP0:%.*]] = mul <8 x i16> [[A:%.*]], [[DOTSPLAT]]277// CHECK-NEXT:    ret <8 x i16> [[TMP0]]278//279int16x8_t test_vmulq_n_s16(int16x8_t a, int16_t b)280{281#ifdef POLYMORPHIC282    return vmulq(a, b);283#else /* POLYMORPHIC */284    return vmulq_n_s16(a, b);285#endif /* POLYMORPHIC */286}287 288// CHECK-LABEL: @test_vmulq_n_u32(289// CHECK-NEXT:  entry:290// CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[B:%.*]], i64 0291// CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer292// CHECK-NEXT:    [[TMP0:%.*]] = mul <4 x i32> [[A:%.*]], [[DOTSPLAT]]293// CHECK-NEXT:    ret <4 x i32> [[TMP0]]294//295uint32x4_t test_vmulq_n_u32(uint32x4_t a, uint32_t b)296{297#ifdef POLYMORPHIC298    return vmulq(a, b);299#else /* POLYMORPHIC */300    return vmulq_n_u32(a, b);301#endif /* POLYMORPHIC */302}303 304// CHECK-NONSTRICT-LABEL: @test_vmulq_n_f32(305// CHECK-NONSTRICT-NEXT:  entry:306// CHECK-NONSTRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> poison, float [[B:%.*]], i64 0307// CHECK-NONSTRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> poison, <4 x i32> zeroinitializer308// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = fmul <4 x float> [[A:%.*]], [[DOTSPLAT]]309// CHECK-NONSTRICT-NEXT:    ret <4 x float> [[TMP0]]310//311// CHECK-STRICT-LABEL: @test_vmulq_n_f32(312// CHECK-STRICT-NEXT:  entry:313// CHECK-STRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> poison, float [[B:%.*]], i64 0314// CHECK-STRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> poison, <4 x i32> zeroinitializer315// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = call <4 x float> @llvm.arm.mve.vmul.v4f32(<4 x float> [[A:%.*]], <4 x float> [[DOTSPLAT]]) #[[ATTR2]]316// CHECK-STRICT-NEXT:    ret <4 x float> [[TMP0]]317//318float32x4_t test_vmulq_n_f32(float32x4_t a, float32_t b)319{320#ifdef POLYMORPHIC321    return vmulq(a, b);322#else /* POLYMORPHIC */323    return vmulq_n_f32(a, b);324#endif /* POLYMORPHIC */325}326 327// CHECK-NONSTRICT-LABEL: @test_vmulq_m_n_s8(328// CHECK-NONSTRICT-NEXT:  entry:329// CHECK-NONSTRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[B:%.*]], i64 0330// CHECK-NONSTRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer331// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32332// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])333// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.mul.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[DOTSPLAT]], <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]])334// CHECK-NONSTRICT-NEXT:    ret <16 x i8> [[TMP2]]335//336// CHECK-STRICT-LABEL: @test_vmulq_m_n_s8(337// CHECK-STRICT-NEXT:  entry:338// CHECK-STRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[B:%.*]], i64 0339// CHECK-STRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer340// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32341// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]]) #[[ATTR2]]342// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.mul.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[DOTSPLAT]], <16 x i1> [[TMP1]], <16 x i8> [[INACTIVE:%.*]]) #[[ATTR2]]343// CHECK-STRICT-NEXT:    ret <16 x i8> [[TMP2]]344//345int8x16_t test_vmulq_m_n_s8(int8x16_t inactive, int8x16_t a, int8_t b, mve_pred16_t p)346{347#ifdef POLYMORPHIC348    return vmulq_m(inactive, a, b, p);349#else /* POLYMORPHIC */350    return vmulq_m_n_s8(inactive, a, b, p);351#endif /* POLYMORPHIC */352}353 354// CHECK-NONSTRICT-LABEL: @test_vmulq_m_n_u16(355// CHECK-NONSTRICT-NEXT:  entry:356// CHECK-NONSTRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[B:%.*]], i64 0357// CHECK-NONSTRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer358// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32359// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])360// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.mul.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[DOTSPLAT]], <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]])361// CHECK-NONSTRICT-NEXT:    ret <8 x i16> [[TMP2]]362//363// CHECK-STRICT-LABEL: @test_vmulq_m_n_u16(364// CHECK-STRICT-NEXT:  entry:365// CHECK-STRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[B:%.*]], i64 0366// CHECK-STRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer367// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32368// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]]) #[[ATTR2]]369// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.mul.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[DOTSPLAT]], <8 x i1> [[TMP1]], <8 x i16> [[INACTIVE:%.*]]) #[[ATTR2]]370// CHECK-STRICT-NEXT:    ret <8 x i16> [[TMP2]]371//372uint16x8_t test_vmulq_m_n_u16(uint16x8_t inactive, uint16x8_t a, uint16_t b, mve_pred16_t p)373{374#ifdef POLYMORPHIC375    return vmulq_m(inactive, a, b, p);376#else /* POLYMORPHIC */377    return vmulq_m_n_u16(inactive, a, b, p);378#endif /* POLYMORPHIC */379}380 381// CHECK-NONSTRICT-LABEL: @test_vmulq_m_n_s32(382// CHECK-NONSTRICT-NEXT:  entry:383// CHECK-NONSTRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[B:%.*]], i64 0384// CHECK-NONSTRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer385// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32386// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])387// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.mul.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[DOTSPLAT]], <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]])388// CHECK-NONSTRICT-NEXT:    ret <4 x i32> [[TMP2]]389//390// CHECK-STRICT-LABEL: @test_vmulq_m_n_s32(391// CHECK-STRICT-NEXT:  entry:392// CHECK-STRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[B:%.*]], i64 0393// CHECK-STRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer394// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32395// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]]) #[[ATTR2]]396// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.mul.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[DOTSPLAT]], <4 x i1> [[TMP1]], <4 x i32> [[INACTIVE:%.*]]) #[[ATTR2]]397// CHECK-STRICT-NEXT:    ret <4 x i32> [[TMP2]]398//399int32x4_t test_vmulq_m_n_s32(int32x4_t inactive, int32x4_t a, int32_t b, mve_pred16_t p)400{401#ifdef POLYMORPHIC402    return vmulq_m(inactive, a, b, p);403#else /* POLYMORPHIC */404    return vmulq_m_n_s32(inactive, a, b, p);405#endif /* POLYMORPHIC */406}407 408// CHECK-NONSTRICT-LABEL: @test_vmulq_m_n_f16(409// CHECK-NONSTRICT-NEXT:  entry:410// CHECK-NONSTRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> poison, half [[B:%.*]], i64 0411// CHECK-NONSTRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> poison, <8 x i32> zeroinitializer412// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32413// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])414// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.mul.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[DOTSPLAT]], <8 x i1> [[TMP1]], <8 x half> [[INACTIVE:%.*]])415// CHECK-NONSTRICT-NEXT:    ret <8 x half> [[TMP2]]416//417// CHECK-STRICT-LABEL: @test_vmulq_m_n_f16(418// CHECK-STRICT-NEXT:  entry:419// CHECK-STRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x half> poison, half [[B:%.*]], i64 0420// CHECK-STRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x half> [[DOTSPLATINSERT]], <8 x half> poison, <8 x i32> zeroinitializer421// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32422// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]]) #[[ATTR2]]423// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <8 x half> @llvm.arm.mve.mul.predicated.v8f16.v8i1(<8 x half> [[A:%.*]], <8 x half> [[DOTSPLAT]], <8 x i1> [[TMP1]], <8 x half> [[INACTIVE:%.*]]) #[[ATTR2]]424// CHECK-STRICT-NEXT:    ret <8 x half> [[TMP2]]425//426float16x8_t test_vmulq_m_n_f16(float16x8_t inactive, float16x8_t a, float16_t b, mve_pred16_t p)427{428#ifdef POLYMORPHIC429    return vmulq_m(inactive, a, b, p);430#else /* POLYMORPHIC */431    return vmulq_m_n_f16(inactive, a, b, p);432#endif /* POLYMORPHIC */433}434 435// CHECK-NONSTRICT-LABEL: @test_vmulq_x_n_u8(436// CHECK-NONSTRICT-NEXT:  entry:437// CHECK-NONSTRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[B:%.*]], i64 0438// CHECK-NONSTRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer439// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32440// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]])441// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.mul.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[DOTSPLAT]], <16 x i1> [[TMP1]], <16 x i8> undef)442// CHECK-NONSTRICT-NEXT:    ret <16 x i8> [[TMP2]]443//444// CHECK-STRICT-LABEL: @test_vmulq_x_n_u8(445// CHECK-STRICT-NEXT:  entry:446// CHECK-STRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <16 x i8> poison, i8 [[B:%.*]], i64 0447// CHECK-STRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <16 x i8> [[DOTSPLATINSERT]], <16 x i8> poison, <16 x i32> zeroinitializer448// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32449// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <16 x i1> @llvm.arm.mve.pred.i2v.v16i1(i32 [[TMP0]]) #[[ATTR2]]450// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <16 x i8> @llvm.arm.mve.mul.predicated.v16i8.v16i1(<16 x i8> [[A:%.*]], <16 x i8> [[DOTSPLAT]], <16 x i1> [[TMP1]], <16 x i8> undef) #[[ATTR2]]451// CHECK-STRICT-NEXT:    ret <16 x i8> [[TMP2]]452//453uint8x16_t test_vmulq_x_n_u8(uint8x16_t a, uint8_t b, mve_pred16_t p)454{455#ifdef POLYMORPHIC456    return vmulq_x(a, b, p);457#else /* POLYMORPHIC */458    return vmulq_x_n_u8(a, b, p);459#endif /* POLYMORPHIC */460}461 462// CHECK-NONSTRICT-LABEL: @test_vmulq_x_n_s16(463// CHECK-NONSTRICT-NEXT:  entry:464// CHECK-NONSTRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[B:%.*]], i64 0465// CHECK-NONSTRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer466// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32467// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]])468// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.mul.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[DOTSPLAT]], <8 x i1> [[TMP1]], <8 x i16> undef)469// CHECK-NONSTRICT-NEXT:    ret <8 x i16> [[TMP2]]470//471// CHECK-STRICT-LABEL: @test_vmulq_x_n_s16(472// CHECK-STRICT-NEXT:  entry:473// CHECK-STRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <8 x i16> poison, i16 [[B:%.*]], i64 0474// CHECK-STRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <8 x i16> [[DOTSPLATINSERT]], <8 x i16> poison, <8 x i32> zeroinitializer475// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32476// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <8 x i1> @llvm.arm.mve.pred.i2v.v8i1(i32 [[TMP0]]) #[[ATTR2]]477// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <8 x i16> @llvm.arm.mve.mul.predicated.v8i16.v8i1(<8 x i16> [[A:%.*]], <8 x i16> [[DOTSPLAT]], <8 x i1> [[TMP1]], <8 x i16> undef) #[[ATTR2]]478// CHECK-STRICT-NEXT:    ret <8 x i16> [[TMP2]]479//480int16x8_t test_vmulq_x_n_s16(int16x8_t a, int16_t b, mve_pred16_t p)481{482#ifdef POLYMORPHIC483    return vmulq_x(a, b, p);484#else /* POLYMORPHIC */485    return vmulq_x_n_s16(a, b, p);486#endif /* POLYMORPHIC */487}488// CHECK-NONSTRICT-LABEL: @test_vmulq_x_n_u32(489// CHECK-NONSTRICT-NEXT:  entry:490// CHECK-NONSTRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[B:%.*]], i64 0491// CHECK-NONSTRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer492// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32493// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])494// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.mul.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[DOTSPLAT]], <4 x i1> [[TMP1]], <4 x i32> undef)495// CHECK-NONSTRICT-NEXT:    ret <4 x i32> [[TMP2]]496//497// CHECK-STRICT-LABEL: @test_vmulq_x_n_u32(498// CHECK-STRICT-NEXT:  entry:499// CHECK-STRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x i32> poison, i32 [[B:%.*]], i64 0500// CHECK-STRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x i32> [[DOTSPLATINSERT]], <4 x i32> poison, <4 x i32> zeroinitializer501// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32502// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]]) #[[ATTR2]]503// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <4 x i32> @llvm.arm.mve.mul.predicated.v4i32.v4i1(<4 x i32> [[A:%.*]], <4 x i32> [[DOTSPLAT]], <4 x i1> [[TMP1]], <4 x i32> undef) #[[ATTR2]]504// CHECK-STRICT-NEXT:    ret <4 x i32> [[TMP2]]505//506uint32x4_t test_vmulq_x_n_u32(uint32x4_t a, uint32_t b, mve_pred16_t p)507{508#ifdef POLYMORPHIC509    return vmulq_x(a, b, p);510#else /* POLYMORPHIC */511    return vmulq_x_n_u32(a, b, p);512#endif /* POLYMORPHIC */513}514 515// CHECK-NONSTRICT-LABEL: @test_vmulq_x_n_f32(516// CHECK-NONSTRICT-NEXT:  entry:517// CHECK-NONSTRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> poison, float [[B:%.*]], i64 0518// CHECK-NONSTRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> poison, <4 x i32> zeroinitializer519// CHECK-NONSTRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32520// CHECK-NONSTRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]])521// CHECK-NONSTRICT-NEXT:    [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.mul.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[DOTSPLAT]], <4 x i1> [[TMP1]], <4 x float> undef)522// CHECK-NONSTRICT-NEXT:    ret <4 x float> [[TMP2]]523//524// CHECK-STRICT-LABEL: @test_vmulq_x_n_f32(525// CHECK-STRICT-NEXT:  entry:526// CHECK-STRICT-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <4 x float> poison, float [[B:%.*]], i64 0527// CHECK-STRICT-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <4 x float> [[DOTSPLATINSERT]], <4 x float> poison, <4 x i32> zeroinitializer528// CHECK-STRICT-NEXT:    [[TMP0:%.*]] = zext i16 [[P:%.*]] to i32529// CHECK-STRICT-NEXT:    [[TMP1:%.*]] = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 [[TMP0]]) #[[ATTR2]]530// CHECK-STRICT-NEXT:    [[TMP2:%.*]] = call <4 x float> @llvm.arm.mve.mul.predicated.v4f32.v4i1(<4 x float> [[A:%.*]], <4 x float> [[DOTSPLAT]], <4 x i1> [[TMP1]], <4 x float> undef) #[[ATTR2]]531// CHECK-STRICT-NEXT:    ret <4 x float> [[TMP2]]532//533float32x4_t test_vmulq_x_n_f32(float32x4_t a, float32_t b, mve_pred16_t p)534{535#ifdef POLYMORPHIC536    return vmulq_x(a, b, p);537#else /* POLYMORPHIC */538    return vmulq_x_n_f32(a, b, p);539#endif /* POLYMORPHIC */540}541