1*11609946SAlexey Bataev; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 2*11609946SAlexey Bataev; RUN: opt -S -passes=slp-vectorizer -mtriple=riscv64-unknown-linux -mattr=+v < %s | FileCheck %s 3*11609946SAlexey Bataev 4*11609946SAlexey Bataevdefine i64 @test(ptr %arg, i32 %arg1, i64 %i) { 5*11609946SAlexey Bataev; CHECK-LABEL: define i64 @test( 6*11609946SAlexey Bataev; CHECK-SAME: ptr [[ARG:%.*]], i32 [[ARG1:%.*]], i64 [[I:%.*]]) #[[ATTR0:[0-9]+]] { 7*11609946SAlexey Bataev; CHECK-NEXT: [[BB:.*:]] 8*11609946SAlexey Bataev; CHECK-NEXT: [[I2:%.*]] = getelementptr i8, ptr [[ARG]], i64 [[I]] 9*11609946SAlexey Bataev; CHECK-NEXT: [[I3:%.*]] = getelementptr i8, ptr [[I2]], i64 [[I]] 10*11609946SAlexey Bataev; CHECK-NEXT: [[I4:%.*]] = getelementptr i8, ptr [[I3]], i64 [[I]] 11*11609946SAlexey Bataev; CHECK-NEXT: [[I5:%.*]] = getelementptr i8, ptr [[I4]], i64 [[I]] 12*11609946SAlexey Bataev; CHECK-NEXT: [[I6:%.*]] = getelementptr i8, ptr [[I5]], i64 [[I]] 13*11609946SAlexey Bataev; CHECK-NEXT: [[I7:%.*]] = getelementptr i8, ptr [[I6]], i64 [[I]] 14*11609946SAlexey Bataev; CHECK-NEXT: [[I8:%.*]] = getelementptr i8, ptr [[I7]], i64 [[I]] 15*11609946SAlexey Bataev; CHECK-NEXT: [[I9:%.*]] = getelementptr i8, ptr [[I8]], i64 [[I]] 16*11609946SAlexey Bataev; CHECK-NEXT: [[I10:%.*]] = getelementptr i8, ptr [[I9]], i64 [[I]] 17*11609946SAlexey Bataev; CHECK-NEXT: [[I11:%.*]] = getelementptr i8, ptr [[I10]], i64 [[I]] 18*11609946SAlexey Bataev; CHECK-NEXT: [[I12:%.*]] = getelementptr i8, ptr [[I11]], i64 [[I]] 19*11609946SAlexey Bataev; CHECK-NEXT: [[I13:%.*]] = getelementptr i8, ptr [[I12]], i64 [[I]] 20*11609946SAlexey Bataev; CHECK-NEXT: [[I14:%.*]] = getelementptr i8, ptr [[I13]], i64 [[I]] 21*11609946SAlexey Bataev; CHECK-NEXT: [[I140:%.*]] = load i8, ptr [[I14]], align 1 22*11609946SAlexey Bataev; CHECK-NEXT: [[I1412:%.*]] = zext i8 [[I140]] to i32 23*11609946SAlexey Bataev; CHECK-NEXT: [[I142:%.*]] = mul i32 [[ARG1]], [[I1412]] 24*11609946SAlexey Bataev; CHECK-NEXT: [[I143:%.*]] = getelementptr i8, ptr [[I13]], i64 15 25*11609946SAlexey Bataev; CHECK-NEXT: [[I144:%.*]] = load i8, ptr [[I143]], align 1 26*11609946SAlexey Bataev; CHECK-NEXT: [[I1453:%.*]] = zext i8 [[I144]] to i32 27*11609946SAlexey Bataev; CHECK-NEXT: [[I146:%.*]] = mul i32 [[ARG1]], [[I1453]] 28*11609946SAlexey Bataev; CHECK-NEXT: [[I147:%.*]] = getelementptr i8, ptr [[I13]], i64 14 29*11609946SAlexey Bataev; CHECK-NEXT: [[I148:%.*]] = load i8, ptr [[I147]], align 1 30*11609946SAlexey Bataev; CHECK-NEXT: [[I1494:%.*]] = zext i8 [[I148]] to i32 31*11609946SAlexey Bataev; CHECK-NEXT: [[I150:%.*]] = mul i32 [[ARG1]], [[I1494]] 32*11609946SAlexey Bataev; CHECK-NEXT: [[I151:%.*]] = getelementptr i8, ptr [[I13]], i64 13 33*11609946SAlexey Bataev; CHECK-NEXT: [[I152:%.*]] = load i8, ptr [[I151]], align 1 34*11609946SAlexey Bataev; CHECK-NEXT: [[I1535:%.*]] = zext i8 [[I152]] to i32 35*11609946SAlexey Bataev; CHECK-NEXT: [[I154:%.*]] = mul i32 [[ARG1]], [[I1535]] 36*11609946SAlexey Bataev; CHECK-NEXT: [[I1311:%.*]] = or i32 [[I142]], [[I146]] 37*11609946SAlexey Bataev; CHECK-NEXT: [[I1312:%.*]] = or i32 [[I1311]], [[I150]] 38*11609946SAlexey Bataev; CHECK-NEXT: [[I1313:%.*]] = or i32 [[I1312]], [[I154]] 39*11609946SAlexey Bataev; CHECK-NEXT: [[I1536:%.*]] = zext i32 [[I1313]] to i64 40*11609946SAlexey Bataev; CHECK-NEXT: ret i64 [[I1536]] 41*11609946SAlexey Bataev; 42*11609946SAlexey Bataevbb: 43*11609946SAlexey Bataev %i2 = getelementptr i8, ptr %arg, i64 %i 44*11609946SAlexey Bataev %i3 = getelementptr i8, ptr %i2, i64 %i 45*11609946SAlexey Bataev %i4 = getelementptr i8, ptr %i3, i64 %i 46*11609946SAlexey Bataev %i5 = getelementptr i8, ptr %i4, i64 %i 47*11609946SAlexey Bataev %i6 = getelementptr i8, ptr %i5, i64 %i 48*11609946SAlexey Bataev %i7 = getelementptr i8, ptr %i6, i64 %i 49*11609946SAlexey Bataev %i8 = getelementptr i8, ptr %i7, i64 %i 50*11609946SAlexey Bataev %i9 = getelementptr i8, ptr %i8, i64 %i 51*11609946SAlexey Bataev %i10 = getelementptr i8, ptr %i9, i64 %i 52*11609946SAlexey Bataev %i11 = getelementptr i8, ptr %i10, i64 %i 53*11609946SAlexey Bataev %i12 = getelementptr i8, ptr %i11, i64 %i 54*11609946SAlexey Bataev %i13 = getelementptr i8, ptr %i12, i64 %i 55*11609946SAlexey Bataev %i14 = getelementptr i8, ptr %i13, i64 %i 56*11609946SAlexey Bataev %i140 = load i8, ptr %i14, align 1 57*11609946SAlexey Bataev %i1412 = zext i8 %i140 to i32 58*11609946SAlexey Bataev %i142 = mul i32 %arg1, %i1412 59*11609946SAlexey Bataev %i143 = getelementptr i8, ptr %i13, i64 15 60*11609946SAlexey Bataev %i144 = load i8, ptr %i143, align 1 61*11609946SAlexey Bataev %i1453 = zext i8 %i144 to i32 62*11609946SAlexey Bataev %i146 = mul i32 %arg1, %i1453 63*11609946SAlexey Bataev %i147 = getelementptr i8, ptr %i13, i64 14 64*11609946SAlexey Bataev %i148 = load i8, ptr %i147, align 1 65*11609946SAlexey Bataev %i1494 = zext i8 %i148 to i32 66*11609946SAlexey Bataev %i150 = mul i32 %arg1, %i1494 67*11609946SAlexey Bataev %i151 = getelementptr i8, ptr %i13, i64 13 68*11609946SAlexey Bataev %i152 = load i8, ptr %i151, align 1 69*11609946SAlexey Bataev %i1535 = zext i8 %i152 to i32 70*11609946SAlexey Bataev %i154 = mul i32 %arg1, %i1535 71*11609946SAlexey Bataev %i1311 = or i32 %i142, %i146 72*11609946SAlexey Bataev %i1312 = or i32 %i1311, %i150 73*11609946SAlexey Bataev %i1313 = or i32 %i1312, %i154 74*11609946SAlexey Bataev %i1536 = zext i32 %i1313 to i64 75*11609946SAlexey Bataev ret i64 %i1536 76*11609946SAlexey Bataev} 77