59 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -O3 -S | FileCheck %s3; RUN: opt < %s -passes="default<O3>" -S | FileCheck %s4 5target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"6target triple = "thumbv8.1m.main-none-none-eabi"7 8define arm_aapcs_vfpcc half @vecAddAcrossF16Mve(<8 x half> %in) #0 {9; CHECK-LABEL: @vecAddAcrossF16Mve(10; CHECK-NEXT: entry:11; CHECK-NEXT: [[TMP0:%.*]] = shufflevector <8 x half> [[IN:%.*]], <8 x half> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>12; CHECK-NEXT: [[TMP1:%.*]] = fadd fast <8 x half> [[TMP0]], [[IN]]13; CHECK-NEXT: [[TMP2:%.*]] = bitcast <8 x half> [[TMP1]] to <4 x i32>14; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x i32> [[TMP2]], <4 x i32> poison, <4 x i32> <i32 1, i32 poison, i32 3, i32 poison>15; CHECK-NEXT: [[TMP4:%.*]] = bitcast <4 x i32> [[TMP3]] to <8 x half>16; CHECK-NEXT: [[TMP5:%.*]] = fadd fast <8 x half> [[TMP1]], [[TMP4]]17; CHECK-NEXT: [[TMP6:%.*]] = extractelement <8 x half> [[TMP5]], i64 018; CHECK-NEXT: [[TMP7:%.*]] = extractelement <8 x half> [[TMP5]], i64 419; CHECK-NEXT: [[ADD:%.*]] = fadd fast half [[TMP6]], [[TMP7]]20; CHECK-NEXT: ret half [[ADD]]21;22entry:23 %0 = shufflevector <8 x half> %in, <8 x half> poison, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>24 %1 = fadd fast <8 x half> %0, %in25 %2 = bitcast <8 x half> %1 to <4 x i32>26 %3 = shufflevector <4 x i32> %2, <4 x i32> poison, <4 x i32> <i32 1, i32 0, i32 3, i32 2>27 %4 = bitcast <4 x i32> %3 to <8 x half>28 %5 = fadd fast <8 x half> %1, %429 %6 = extractelement <8 x half> %5, i32 030 %7 = extractelement <8 x half> %5, i32 431 %add = fadd fast half %6, %732 ret half %add33}34 35define arm_aapcs_vfpcc float @vecAddAcrossF32Mve(<4 x float> %in) {36; CHECK-LABEL: @vecAddAcrossF32Mve(37; CHECK-NEXT: entry:38; CHECK-NEXT: [[TMP0:%.*]] = extractelement <4 x float> [[IN:%.*]], i64 039; CHECK-NEXT: [[TMP1:%.*]] = extractelement <4 x float> [[IN]], i64 140; CHECK-NEXT: [[ADD:%.*]] = fadd fast float [[TMP0]], [[TMP1]]41; CHECK-NEXT: [[TMP2:%.*]] = extractelement <4 x float> [[IN]], i64 242; CHECK-NEXT: [[ADD1:%.*]] = fadd fast float [[ADD]], [[TMP2]]43; CHECK-NEXT: [[TMP3:%.*]] = extractelement <4 x float> [[IN]], i64 344; CHECK-NEXT: [[ADD2:%.*]] = fadd fast float [[ADD1]], [[TMP3]]45; CHECK-NEXT: ret float [[ADD2]]46;47entry:48 %0 = extractelement <4 x float> %in, i32 049 %1 = extractelement <4 x float> %in, i32 150 %add = fadd fast float %0, %151 %2 = extractelement <4 x float> %in, i32 252 %add1 = fadd fast float %add, %253 %3 = extractelement <4 x float> %in, i32 354 %add2 = fadd fast float %add1, %355 ret float %add256}57 58attributes #0 = { "target-features"="+mve.fp" }59