brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.5 KiB · 8dfff06 Raw
161 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py2// REQUIRES: aarch64-registered-target3 4// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve2 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s5// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +sve2 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK6// RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s7// RUN: %clang_cc1 -fclang-abi-compat=latest -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK8 9#include <arm_sve.h>10 11#ifdef SVE_OVERLOADED_FORMS12// A simple used,unused... macro, long enough to represent any SVE builtin.13#define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A314#else15#define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A416#endif17 18// CHECK-LABEL: @test_svpmullt_pair_u8(19// CHECK-NEXT:  entry:20// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.pmullt.pair.nxv16i8(<vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]])21// CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]22//23// CPP-CHECK-LABEL: @_Z21test_svpmullt_pair_u8u11__SVUint8_tS_(24// CPP-CHECK-NEXT:  entry:25// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.pmullt.pair.nxv16i8(<vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]])26// CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]27//28svuint8_t test_svpmullt_pair_u8(svuint8_t op1, svuint8_t op2)29{30  return SVE_ACLE_FUNC(svpmullt_pair,_u8,,)(op1, op2);31}32 33// CHECK-LABEL: @test_svpmullt_pair_u32(34// CHECK-NEXT:  entry:35// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.pmullt.pair.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]])36// CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]37//38// CPP-CHECK-LABEL: @_Z22test_svpmullt_pair_u32u12__SVUint32_tS_(39// CPP-CHECK-NEXT:  entry:40// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.pmullt.pair.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]])41// CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]42//43svuint32_t test_svpmullt_pair_u32(svuint32_t op1, svuint32_t op2)44{45  return SVE_ACLE_FUNC(svpmullt_pair,_u32,,)(op1, op2);46}47 48// CHECK-LABEL: @test_svpmullt_pair_n_u8(49// CHECK-NEXT:  entry:50// CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP2:%.*]], i64 051// CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer52// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.pmullt.pair.nxv16i8(<vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[DOTSPLAT]])53// CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]54//55// CPP-CHECK-LABEL: @_Z23test_svpmullt_pair_n_u8u11__SVUint8_th(56// CPP-CHECK-NEXT:  entry:57// CPP-CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP2:%.*]], i64 058// CPP-CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer59// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.pmullt.pair.nxv16i8(<vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[DOTSPLAT]])60// CPP-CHECK-NEXT:    ret <vscale x 16 x i8> [[TMP0]]61//62svuint8_t test_svpmullt_pair_n_u8(svuint8_t op1, uint8_t op2)63{64  return SVE_ACLE_FUNC(svpmullt_pair,_n_u8,,)(op1, op2);65}66 67// CHECK-LABEL: @test_svpmullt_pair_n_u32(68// CHECK-NEXT:  entry:69// CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP2:%.*]], i64 070// CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer71// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.pmullt.pair.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[DOTSPLAT]])72// CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]73//74// CPP-CHECK-LABEL: @_Z24test_svpmullt_pair_n_u32u12__SVUint32_tj(75// CPP-CHECK-NEXT:  entry:76// CPP-CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP2:%.*]], i64 077// CPP-CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer78// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.pmullt.pair.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[DOTSPLAT]])79// CPP-CHECK-NEXT:    ret <vscale x 4 x i32> [[TMP0]]80//81svuint32_t test_svpmullt_pair_n_u32(svuint32_t op1, uint32_t op2)82{83  return SVE_ACLE_FUNC(svpmullt_pair,_n_u32,,)(op1, op2);84}85 86// CHECK-LABEL: @test_svpmullt_u16(87// CHECK-NEXT:  entry:88// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.pmullt.pair.nxv16i8(<vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]])89// CHECK-NEXT:    [[TMP1:%.*]] = bitcast <vscale x 16 x i8> [[TMP0]] to <vscale x 8 x i16>90// CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]91//92// CPP-CHECK-LABEL: @_Z17test_svpmullt_u16u11__SVUint8_tS_(93// CPP-CHECK-NEXT:  entry:94// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.pmullt.pair.nxv16i8(<vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[OP2:%.*]])95// CPP-CHECK-NEXT:    [[TMP1:%.*]] = bitcast <vscale x 16 x i8> [[TMP0]] to <vscale x 8 x i16>96// CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]97//98svuint16_t test_svpmullt_u16(svuint8_t op1, svuint8_t op2)99{100  return SVE_ACLE_FUNC(svpmullt,_u16,,)(op1, op2);101}102 103// CHECK-LABEL: @test_svpmullt_u64(104// CHECK-NEXT:  entry:105// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.pmullt.pair.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]])106// CHECK-NEXT:    [[TMP1:%.*]] = bitcast <vscale x 4 x i32> [[TMP0]] to <vscale x 2 x i64>107// CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]108//109// CPP-CHECK-LABEL: @_Z17test_svpmullt_u64u12__SVUint32_tS_(110// CPP-CHECK-NEXT:  entry:111// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.pmullt.pair.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[OP2:%.*]])112// CPP-CHECK-NEXT:    [[TMP1:%.*]] = bitcast <vscale x 4 x i32> [[TMP0]] to <vscale x 2 x i64>113// CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]114//115svuint64_t test_svpmullt_u64(svuint32_t op1, svuint32_t op2)116{117  return SVE_ACLE_FUNC(svpmullt,_u64,,)(op1, op2);118}119 120// CHECK-LABEL: @test_svpmullt_n_u16(121// CHECK-NEXT:  entry:122// CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP2:%.*]], i64 0123// CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer124// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.pmullt.pair.nxv16i8(<vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[DOTSPLAT]])125// CHECK-NEXT:    [[TMP1:%.*]] = bitcast <vscale x 16 x i8> [[TMP0]] to <vscale x 8 x i16>126// CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]127//128// CPP-CHECK-LABEL: @_Z19test_svpmullt_n_u16u11__SVUint8_th(129// CPP-CHECK-NEXT:  entry:130// CPP-CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 16 x i8> poison, i8 [[OP2:%.*]], i64 0131// CPP-CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <vscale x 16 x i8> [[DOTSPLATINSERT]], <vscale x 16 x i8> poison, <vscale x 16 x i32> zeroinitializer132// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.pmullt.pair.nxv16i8(<vscale x 16 x i8> [[OP1:%.*]], <vscale x 16 x i8> [[DOTSPLAT]])133// CPP-CHECK-NEXT:    [[TMP1:%.*]] = bitcast <vscale x 16 x i8> [[TMP0]] to <vscale x 8 x i16>134// CPP-CHECK-NEXT:    ret <vscale x 8 x i16> [[TMP1]]135//136svuint16_t test_svpmullt_n_u16(svuint8_t op1, uint8_t op2)137{138  return SVE_ACLE_FUNC(svpmullt,_n_u16,,)(op1, op2);139}140 141// CHECK-LABEL: @test_svpmullt_n_u64(142// CHECK-NEXT:  entry:143// CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP2:%.*]], i64 0144// CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer145// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.pmullt.pair.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[DOTSPLAT]])146// CHECK-NEXT:    [[TMP1:%.*]] = bitcast <vscale x 4 x i32> [[TMP0]] to <vscale x 2 x i64>147// CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]148//149// CPP-CHECK-LABEL: @_Z19test_svpmullt_n_u64u12__SVUint32_tj(150// CPP-CHECK-NEXT:  entry:151// CPP-CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[OP2:%.*]], i64 0152// CPP-CHECK-NEXT:    [[DOTSPLAT:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer153// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i32> @llvm.aarch64.sve.pmullt.pair.nxv4i32(<vscale x 4 x i32> [[OP1:%.*]], <vscale x 4 x i32> [[DOTSPLAT]])154// CPP-CHECK-NEXT:    [[TMP1:%.*]] = bitcast <vscale x 4 x i32> [[TMP0]] to <vscale x 2 x i64>155// CPP-CHECK-NEXT:    ret <vscale x 2 x i64> [[TMP1]]156//157svuint64_t test_svpmullt_n_u64(svuint32_t op1, uint32_t op2)158{159  return SVE_ACLE_FUNC(svpmullt,_n_u64,,)(op1, op2);160}161