116 lines · c
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 52 3// REQUIRES: arm-registered-target4 5// RUN: %clang_cc1 -triple armv8a-arm-none-eabihf -target-cpu generic -emit-llvm -o - %s -disable-O0-optnone | \6// RUN: opt -S -passes=instcombine -o - | FileCheck %s --check-prefix=LE7// RUN: %clang_cc1 -triple armebv8a-arm-none-eabihf -target-cpu generic -emit-llvm -o - %s -disable-O0-optnone | \8// RUN: opt -S -passes=instcombine -o - | FileCheck %s --check-prefix=BE9 10#include <arm_neon.h>11 12// LE-LABEL: define dso_local i32 @int32x4_t_lane_0(13// LE-SAME: <4 x i32> noundef [[A:%.*]]) #[[ATTR0:[0-9]+]] {14// LE-NEXT: [[ENTRY:.*:]]15// LE-NEXT: [[VGET_LANE:%.*]] = extractelement <4 x i32> [[A]], i64 016// LE-NEXT: ret i32 [[VGET_LANE]]17//18// BE-LABEL: define dso_local i32 @int32x4_t_lane_0(19// BE-SAME: <4 x i32> noundef [[A:%.*]]) #[[ATTR0:[0-9]+]] {20// BE-NEXT: [[ENTRY:.*:]]21// BE-NEXT: [[VGET_LANE:%.*]] = extractelement <4 x i32> [[A]], i64 122// BE-NEXT: ret i32 [[VGET_LANE]]23//24int int32x4_t_lane_0(int32x4_t a) { return vgetq_lane_s32(a, 0); }25// LE-LABEL: define dso_local i32 @int32x4_t_lane_1(26// LE-SAME: <4 x i32> noundef [[A:%.*]]) #[[ATTR0]] {27// LE-NEXT: [[ENTRY:.*:]]28// LE-NEXT: [[VGET_LANE:%.*]] = extractelement <4 x i32> [[A]], i64 129// LE-NEXT: ret i32 [[VGET_LANE]]30//31// BE-LABEL: define dso_local i32 @int32x4_t_lane_1(32// BE-SAME: <4 x i32> noundef [[A:%.*]]) #[[ATTR0]] {33// BE-NEXT: [[ENTRY:.*:]]34// BE-NEXT: [[VGET_LANE:%.*]] = extractelement <4 x i32> [[A]], i64 035// BE-NEXT: ret i32 [[VGET_LANE]]36//37int int32x4_t_lane_1(int32x4_t a) { return vgetq_lane_s32(a, 1); }38// LE-LABEL: define dso_local i32 @int32x4_t_lane_2(39// LE-SAME: <4 x i32> noundef [[A:%.*]]) #[[ATTR0]] {40// LE-NEXT: [[ENTRY:.*:]]41// LE-NEXT: [[VGET_LANE:%.*]] = extractelement <4 x i32> [[A]], i64 242// LE-NEXT: ret i32 [[VGET_LANE]]43//44// BE-LABEL: define dso_local i32 @int32x4_t_lane_2(45// BE-SAME: <4 x i32> noundef [[A:%.*]]) #[[ATTR0]] {46// BE-NEXT: [[ENTRY:.*:]]47// BE-NEXT: [[VGET_LANE:%.*]] = extractelement <4 x i32> [[A]], i64 348// BE-NEXT: ret i32 [[VGET_LANE]]49//50int int32x4_t_lane_2(int32x4_t a) { return vgetq_lane_s32(a, 2); }51// LE-LABEL: define dso_local i32 @int32x4_t_lane_3(52// LE-SAME: <4 x i32> noundef [[A:%.*]]) #[[ATTR0]] {53// LE-NEXT: [[ENTRY:.*:]]54// LE-NEXT: [[VGET_LANE:%.*]] = extractelement <4 x i32> [[A]], i64 355// LE-NEXT: ret i32 [[VGET_LANE]]56//57// BE-LABEL: define dso_local i32 @int32x4_t_lane_3(58// BE-SAME: <4 x i32> noundef [[A:%.*]]) #[[ATTR0]] {59// BE-NEXT: [[ENTRY:.*:]]60// BE-NEXT: [[VGET_LANE:%.*]] = extractelement <4 x i32> [[A]], i64 261// BE-NEXT: ret i32 [[VGET_LANE]]62//63int int32x4_t_lane_3(int32x4_t a) { return vgetq_lane_s32(a, 3); }64// LE-LABEL: define dso_local i32 @int32x2_t_lane_0(65// LE-SAME: <2 x i32> noundef [[A:%.*]]) #[[ATTR0]] {66// LE-NEXT: [[ENTRY:.*:]]67// LE-NEXT: [[VGET_LANE:%.*]] = extractelement <2 x i32> [[A]], i64 068// LE-NEXT: ret i32 [[VGET_LANE]]69//70// BE-LABEL: define dso_local i32 @int32x2_t_lane_0(71// BE-SAME: <2 x i32> noundef [[A:%.*]]) #[[ATTR0]] {72// BE-NEXT: [[ENTRY:.*:]]73// BE-NEXT: [[VGET_LANE:%.*]] = extractelement <2 x i32> [[A]], i64 174// BE-NEXT: ret i32 [[VGET_LANE]]75//76int int32x2_t_lane_0(int32x2_t a) { return vget_lane_s32(a, 0); }77// LE-LABEL: define dso_local i32 @int32x2_t_lane_1(78// LE-SAME: <2 x i32> noundef [[A:%.*]]) #[[ATTR0]] {79// LE-NEXT: [[ENTRY:.*:]]80// LE-NEXT: [[VGET_LANE:%.*]] = extractelement <2 x i32> [[A]], i64 181// LE-NEXT: ret i32 [[VGET_LANE]]82//83// BE-LABEL: define dso_local i32 @int32x2_t_lane_1(84// BE-SAME: <2 x i32> noundef [[A:%.*]]) #[[ATTR0]] {85// BE-NEXT: [[ENTRY:.*:]]86// BE-NEXT: [[VGET_LANE:%.*]] = extractelement <2 x i32> [[A]], i64 087// BE-NEXT: ret i32 [[VGET_LANE]]88//89int int32x2_t_lane_1(int32x2_t a) { return vget_lane_s32(a, 1); }90// LE-LABEL: define dso_local i64 @int64x2_t_lane_0(91// LE-SAME: <2 x i64> noundef [[A:%.*]]) #[[ATTR0]] {92// LE-NEXT: [[ENTRY:.*:]]93// LE-NEXT: [[VGET_LANE:%.*]] = extractelement <2 x i64> [[A]], i64 094// LE-NEXT: ret i64 [[VGET_LANE]]95//96// BE-LABEL: define dso_local i64 @int64x2_t_lane_0(97// BE-SAME: <2 x i64> noundef [[A:%.*]]) #[[ATTR0]] {98// BE-NEXT: [[ENTRY:.*:]]99// BE-NEXT: [[VGET_LANE:%.*]] = extractelement <2 x i64> [[A]], i64 0100// BE-NEXT: ret i64 [[VGET_LANE]]101//102int64_t int64x2_t_lane_0(int64x2_t a) { return vgetq_lane_s64(a, 0); }103// LE-LABEL: define dso_local i64 @int64x2_t_lane_1(104// LE-SAME: <2 x i64> noundef [[A:%.*]]) #[[ATTR0]] {105// LE-NEXT: [[ENTRY:.*:]]106// LE-NEXT: [[VGET_LANE:%.*]] = extractelement <2 x i64> [[A]], i64 1107// LE-NEXT: ret i64 [[VGET_LANE]]108//109// BE-LABEL: define dso_local i64 @int64x2_t_lane_1(110// BE-SAME: <2 x i64> noundef [[A:%.*]]) #[[ATTR0]] {111// BE-NEXT: [[ENTRY:.*:]]112// BE-NEXT: [[VGET_LANE:%.*]] = extractelement <2 x i64> [[A]], i64 1113// BE-NEXT: ret i64 [[VGET_LANE]]114//115int64_t int64x2_t_lane_1(int64x2_t a) { return vgetq_lane_s64(a, 1); }116