brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 3a7112f Raw
57 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -S --passes=slp-vectorizer -mtriple=riscv64-unknown-linux-gnu -mattr=+v < %s | FileCheck %s3 4define i16 @test(ptr %i) {5; CHECK-LABEL: define i16 @test(6; CHECK-SAME: ptr [[I:%.*]]) #[[ATTR0:[0-9]+]] {7; CHECK-NEXT:  [[ENTRY:.*:]]8; CHECK-NEXT:    [[TMP0:%.*]] = insertelement <2 x ptr> poison, ptr [[I]], i32 09; CHECK-NEXT:    [[TMP1:%.*]] = shufflevector <2 x ptr> [[TMP0]], <2 x ptr> poison, <2 x i32> zeroinitializer10; CHECK-NEXT:    [[TMP2:%.*]] = getelementptr i8, <2 x ptr> [[TMP1]], <2 x i64> <i64 132860, i64 137774>11; CHECK-NEXT:    [[TMP3:%.*]] = shufflevector <2 x ptr> [[TMP2]], <2 x ptr> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>12; CHECK-NEXT:    [[GEP_US154_2:%.*]] = getelementptr i8, ptr [[I]], i64 14268813; CHECK-NEXT:    br label %[[FOR_COND5_US:.*]]14; CHECK:       [[FOR_COND5_US]]:15; CHECK-NEXT:    [[TMP4:%.*]] = call <4 x i16> @llvm.experimental.vp.strided.load.v4i16.p0.i64(ptr align 2 [[GEP_US154_2]], i64 4914, <4 x i1> splat (i1 true), i32 4)16; CHECK-NEXT:    [[TMP5:%.*]] = call <4 x i16> @llvm.masked.gather.v4i16.v4p0(<4 x ptr> align 2 [[TMP3]], <4 x i1> splat (i1 true), <4 x i16> poison)17; CHECK-NEXT:    [[TMP6:%.*]] = shufflevector <4 x i16> [[TMP4]], <4 x i16> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>18; CHECK-NEXT:    [[TMP10:%.*]] = shufflevector <4 x i16> [[TMP5]], <4 x i16> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>19; CHECK-NEXT:    [[TMP7:%.*]] = shufflevector <4 x i16> [[TMP4]], <4 x i16> [[TMP5]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>20; CHECK-NEXT:    [[TMP8:%.*]] = call i16 @llvm.vector.reduce.umax.v8i16(<8 x i16> [[TMP7]])21; CHECK-NEXT:    [[TMP9:%.*]] = call i16 @llvm.umax.i16(i16 [[TMP8]], i16 0)22; CHECK-NEXT:    ret i16 [[TMP9]]23;24entry:25  %gep.us154 = getelementptr i8, ptr %i, i64 13286026  %gep.us154.1 = getelementptr i8, ptr %i, i64 13777427  %gep.us154.2 = getelementptr i8, ptr %i, i64 14268828  %gep.us154.3 = getelementptr i8, ptr %i, i64 14760229  %gep.us154.4 = getelementptr i8, ptr %i, i64 15251630  %gep.us154.5 = getelementptr i8, ptr %i, i64 15743031  br label %for.cond5.us32 33for.cond5.us:34  %0 = load i16, ptr %gep.us154, align 235  %1 = load i16, ptr %gep.us154.1, align 236  %2 = load i16, ptr %gep.us154.2, align 237  %3 = load i16, ptr %gep.us154.3, align 238  %4 = load i16, ptr %gep.us154.4, align 239  %5 = load i16, ptr %gep.us154.5, align 240  %6 = call i16 @llvm.umax.i16(i16 %5, i16 0)41  %7 = call i16 @llvm.umax.i16(i16 %0, i16 %6)42  %8 = call i16 @llvm.umax.i16(i16 %1, i16 %7)43  %9 = call i16 @llvm.umax.i16(i16 %2, i16 %8)44  %10 = call i16 @llvm.umax.i16(i16 %3, i16 %9)45  %11 = call i16 @llvm.umax.i16(i16 %2, i16 %10)46  %12 = call i16 @llvm.umax.i16(i16 %3, i16 %11)47  %13 = call i16 @llvm.umax.i16(i16 %4, i16 %12)48  %14 = load i16, ptr %gep.us154, align 249  %15 = call i16 @llvm.umax.i16(i16 %14, i16 %13)50  %16 = load i16, ptr %gep.us154.1, align 251  %17 = call i16 @llvm.umax.i16(i16 %16, i16 %15)52  %18 = call i16 @llvm.umax.i16(i16 %4, i16 %17)53  ret i16 %1854}55 56declare i16 @llvm.umax.i16(i16, i16) #157