brintos

brintos / llvm-project-archived public Read only

0
0
Text · 14.1 KiB · 7f28fcd Raw
281 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py2// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s3// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK4// RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s5// RUN: %clang_cc1 -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-CHECK6 7// REQUIRES: aarch64-registered-target8 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_svwhilegt_b8_s32(19// CHECK-NEXT:  entry:20// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.whilegt.nxv16i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])21// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP0]]22//23// CPP-CHECK-LABEL: @_Z21test_svwhilegt_b8_s32ii(24// CPP-CHECK-NEXT:  entry:25// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.whilegt.nxv16i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])26// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP0]]27//28svbool_t test_svwhilegt_b8_s32(int32_t op1, int32_t op2)29{30  return SVE_ACLE_FUNC(svwhilegt_b8,_s32,,)(op1, op2);31}32 33// CHECK-LABEL: @test_svwhilegt_b16_s32(34// CHECK-NEXT:  entry:35// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.whilegt.nxv8i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])36// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP0]])37// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]38//39// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b16_s32ii(40// CPP-CHECK-NEXT:  entry:41// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.whilegt.nxv8i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])42// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP0]])43// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]44//45svbool_t test_svwhilegt_b16_s32(int32_t op1, int32_t op2)46{47  return SVE_ACLE_FUNC(svwhilegt_b16,_s32,,)(op1, op2);48}49 50// CHECK-LABEL: @test_svwhilegt_b32_s32(51// CHECK-NEXT:  entry:52// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.whilegt.nxv4i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])53// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP0]])54// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]55//56// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b32_s32ii(57// CPP-CHECK-NEXT:  entry:58// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.whilegt.nxv4i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])59// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP0]])60// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]61//62svbool_t test_svwhilegt_b32_s32(int32_t op1, int32_t op2)63{64  return SVE_ACLE_FUNC(svwhilegt_b32,_s32,,)(op1, op2);65}66 67// CHECK-LABEL: @test_svwhilegt_b64_s32(68// CHECK-NEXT:  entry:69// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.whilegt.nxv2i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])70// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP0]])71// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]72//73// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b64_s32ii(74// CPP-CHECK-NEXT:  entry:75// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.whilegt.nxv2i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])76// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP0]])77// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]78//79svbool_t test_svwhilegt_b64_s32(int32_t op1, int32_t op2)80{81  return SVE_ACLE_FUNC(svwhilegt_b64,_s32,,)(op1, op2);82}83 84// CHECK-LABEL: @test_svwhilegt_b8_u32(85// CHECK-NEXT:  entry:86// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.whilehi.nxv16i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])87// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP0]]88//89// CPP-CHECK-LABEL: @_Z21test_svwhilegt_b8_u32jj(90// CPP-CHECK-NEXT:  entry:91// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.whilehi.nxv16i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])92// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP0]]93//94svbool_t test_svwhilegt_b8_u32(uint32_t op1, uint32_t op2)95{96  return SVE_ACLE_FUNC(svwhilegt_b8,_u32,,)(op1, op2);97}98 99// CHECK-LABEL: @test_svwhilegt_b16_u32(100// CHECK-NEXT:  entry:101// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.whilehi.nxv8i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])102// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP0]])103// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]104//105// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b16_u32jj(106// CPP-CHECK-NEXT:  entry:107// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.whilehi.nxv8i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])108// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP0]])109// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]110//111svbool_t test_svwhilegt_b16_u32(uint32_t op1, uint32_t op2)112{113  return SVE_ACLE_FUNC(svwhilegt_b16,_u32,,)(op1, op2);114}115 116// CHECK-LABEL: @test_svwhilegt_b32_u32(117// CHECK-NEXT:  entry:118// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.whilehi.nxv4i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])119// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP0]])120// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]121//122// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b32_u32jj(123// CPP-CHECK-NEXT:  entry:124// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.whilehi.nxv4i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])125// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP0]])126// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]127//128svbool_t test_svwhilegt_b32_u32(uint32_t op1, uint32_t op2)129{130  return SVE_ACLE_FUNC(svwhilegt_b32,_u32,,)(op1, op2);131}132 133// CHECK-LABEL: @test_svwhilegt_b64_u32(134// CHECK-NEXT:  entry:135// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.whilehi.nxv2i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])136// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP0]])137// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]138//139// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b64_u32jj(140// CPP-CHECK-NEXT:  entry:141// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.whilehi.nxv2i1.i32(i32 [[OP1:%.*]], i32 [[OP2:%.*]])142// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP0]])143// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]144//145svbool_t test_svwhilegt_b64_u32(uint32_t op1, uint32_t op2)146{147  return SVE_ACLE_FUNC(svwhilegt_b64,_u32,,)(op1, op2);148}149 150// CHECK-LABEL: @test_svwhilegt_b8_s64(151// CHECK-NEXT:  entry:152// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.whilegt.nxv16i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])153// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP0]]154//155// CPP-CHECK-LABEL: @_Z21test_svwhilegt_b8_s64ll(156// CPP-CHECK-NEXT:  entry:157// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.whilegt.nxv16i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])158// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP0]]159//160svbool_t test_svwhilegt_b8_s64(int64_t op1, int64_t op2)161{162  return SVE_ACLE_FUNC(svwhilegt_b8,_s64,,)(op1, op2);163}164 165// CHECK-LABEL: @test_svwhilegt_b16_s64(166// CHECK-NEXT:  entry:167// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.whilegt.nxv8i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])168// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP0]])169// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]170//171// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b16_s64ll(172// CPP-CHECK-NEXT:  entry:173// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.whilegt.nxv8i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])174// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP0]])175// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]176//177svbool_t test_svwhilegt_b16_s64(int64_t op1, int64_t op2)178{179  return SVE_ACLE_FUNC(svwhilegt_b16,_s64,,)(op1, op2);180}181 182// CHECK-LABEL: @test_svwhilegt_b32_s64(183// CHECK-NEXT:  entry:184// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.whilegt.nxv4i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])185// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP0]])186// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]187//188// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b32_s64ll(189// CPP-CHECK-NEXT:  entry:190// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.whilegt.nxv4i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])191// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP0]])192// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]193//194svbool_t test_svwhilegt_b32_s64(int64_t op1, int64_t op2)195{196  return SVE_ACLE_FUNC(svwhilegt_b32,_s64,,)(op1, op2);197}198 199// CHECK-LABEL: @test_svwhilegt_b64_s64(200// CHECK-NEXT:  entry:201// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.whilegt.nxv2i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])202// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP0]])203// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]204//205// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b64_s64ll(206// CPP-CHECK-NEXT:  entry:207// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.whilegt.nxv2i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])208// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP0]])209// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]210//211svbool_t test_svwhilegt_b64_s64(int64_t op1, int64_t op2)212{213  return SVE_ACLE_FUNC(svwhilegt_b64,_s64,,)(op1, op2);214}215 216// CHECK-LABEL: @test_svwhilegt_b8_u64(217// CHECK-NEXT:  entry:218// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.whilehi.nxv16i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])219// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP0]]220//221// CPP-CHECK-LABEL: @_Z21test_svwhilegt_b8_u64mm(222// CPP-CHECK-NEXT:  entry:223// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.whilehi.nxv16i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])224// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP0]]225//226svbool_t test_svwhilegt_b8_u64(uint64_t op1, uint64_t op2)227{228  return SVE_ACLE_FUNC(svwhilegt_b8,_u64,,)(op1, op2);229}230 231// CHECK-LABEL: @test_svwhilegt_b16_u64(232// CHECK-NEXT:  entry:233// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.whilehi.nxv8i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])234// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP0]])235// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]236//237// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b16_u64mm(238// CPP-CHECK-NEXT:  entry:239// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.whilehi.nxv8i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])240// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP0]])241// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]242//243svbool_t test_svwhilegt_b16_u64(uint64_t op1, uint64_t op2)244{245  return SVE_ACLE_FUNC(svwhilegt_b16,_u64,,)(op1, op2);246}247 248// CHECK-LABEL: @test_svwhilegt_b32_u64(249// CHECK-NEXT:  entry:250// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.whilehi.nxv4i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])251// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP0]])252// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]253//254// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b32_u64mm(255// CPP-CHECK-NEXT:  entry:256// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.whilehi.nxv4i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])257// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP0]])258// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]259//260svbool_t test_svwhilegt_b32_u64(uint64_t op1, uint64_t op2)261{262  return SVE_ACLE_FUNC(svwhilegt_b32,_u64,,)(op1, op2);263}264 265// CHECK-LABEL: @test_svwhilegt_b64_u64(266// CHECK-NEXT:  entry:267// CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.whilehi.nxv2i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])268// CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP0]])269// CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]270//271// CPP-CHECK-LABEL: @_Z22test_svwhilegt_b64_u64mm(272// CPP-CHECK-NEXT:  entry:273// CPP-CHECK-NEXT:    [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.whilehi.nxv2i1.i64(i64 [[OP1:%.*]], i64 [[OP2:%.*]])274// CPP-CHECK-NEXT:    [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP0]])275// CPP-CHECK-NEXT:    ret <vscale x 16 x i1> [[TMP1]]276//277svbool_t test_svwhilegt_b64_u64(uint64_t op1, uint64_t op2)278{279  return SVE_ACLE_FUNC(svwhilegt_b64,_u64,,)(op1, op2);280}281