61 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: %if x86-registered-target %{ opt -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s %}3; RUN: %if aarch64-registered-target %{ opt -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s %}4 5define void @foo(ptr %c, ptr %d) {6; CHECK-LABEL: @foo(7; CHECK-NEXT: entry:8; CHECK-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds i8, ptr [[C:%.*]], i64 19; CHECK-NEXT: [[ADD_PTR53:%.*]] = getelementptr inbounds float, ptr [[D:%.*]], i64 -410; CHECK-NEXT: [[TMP1:%.*]] = load <4 x i8>, ptr [[ARRAYIDX4]], align 111; CHECK-NEXT: [[TMP2:%.*]] = zext <4 x i8> [[TMP1]] to <4 x i32>12; CHECK-NEXT: [[TMP3:%.*]] = shl nuw nsw <4 x i32> [[TMP2]], <i32 2, i32 2, i32 2, i32 3>13; CHECK-NEXT: [[TMP4:%.*]] = and <4 x i32> [[TMP2]], <i32 2, i32 2, i32 2, i32 3>14; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <4 x i32> [[TMP3]], <4 x i32> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 2, i32 7>15; CHECK-NEXT: [[TMP6:%.*]] = add nsw <4 x i32> undef, [[TMP5]]16; CHECK-NEXT: [[TMP7:%.*]] = sitofp <4 x i32> [[TMP6]] to <4 x float>17; CHECK-NEXT: [[TMP8:%.*]] = fdiv <4 x float> [[TMP7]], undef18; CHECK-NEXT: [[TMP9:%.*]] = shufflevector <4 x float> [[TMP8]], <4 x float> poison, <4 x i32> <i32 1, i32 2, i32 3, i32 0>19; CHECK-NEXT: store <4 x float> [[TMP9]], ptr [[ADD_PTR53]], align 420; CHECK-NEXT: ret void21;22entry:23 %arrayidx1 = getelementptr inbounds i8, ptr %c, i64 424 %0 = load i8, ptr %arrayidx1, align 125 %conv2 = zext i8 %0 to i3226 %and = and i32 %conv2, 327 %arrayidx4 = getelementptr inbounds i8, ptr %c, i64 128 %1 = load i8, ptr %arrayidx4, align 129 %conv5 = zext i8 %1 to i3230 %shl6 = shl nuw nsw i32 %conv5, 231 %arrayidx12 = getelementptr inbounds i8, ptr %c, i64 232 %2 = load i8, ptr %arrayidx12, align 133 %conv13 = zext i8 %2 to i3234 %shl14 = shl nuw nsw i32 %conv13, 235 %arrayidx17 = getelementptr inbounds i8, ptr %c, i64 336 %3 = load i8, ptr %arrayidx17, align 137 %conv18 = zext i8 %3 to i3238 %shl19 = shl nuw nsw i32 %conv18, 239 %sub = add nsw i32 undef, %shl640 %conv27 = sitofp i32 %sub to float41 %div = fdiv float %conv27, undef42 %add.ptr = getelementptr inbounds float, ptr %d, i64 -143 store float %div, ptr %add.ptr, align 444 %sub32 = add nsw i32 undef, %and45 %conv33 = sitofp i32 %sub32 to float46 %div36 = fdiv float %conv33, undef47 %add.ptr37 = getelementptr inbounds float, ptr %d, i64 -248 store float %div36, ptr %add.ptr37, align 449 %sub40 = add nsw i32 undef, %shl1950 %conv41 = sitofp i32 %sub40 to float51 %div44 = fdiv float %conv41, undef52 %add.ptr45 = getelementptr inbounds float, ptr %d, i64 -353 store float %div44, ptr %add.ptr45, align 454 %sub48 = add nsw i32 undef, %shl1455 %conv49 = sitofp i32 %sub48 to float56 %div52 = fdiv float %conv49, undef57 %add.ptr53 = getelementptr inbounds float, ptr %d, i64 -458 store float %div52, ptr %add.ptr53, align 459 ret void60}61