1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-apple-macosx10.8.0 -slp-threshold=-8 | FileCheck %s
declare float @llvm.powi.f32.i32(float, i32)
define void @vec_powi_f32(ptr %a, ptr %c, i32 %P) {
; CHECK-LABEL: @vec_powi_f32(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[I0:%.*]] = load float, ptr [[A:%.*]], align 4
; CHECK-NEXT: [[CALL1:%.*]] = tail call float @llvm.powi.f32.i32(float [[I0]], i32 [[P:%.*]])
; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds float, ptr [[A]], i32 1
; CHECK-NEXT: [[I2:%.*]] = load float, ptr [[ARRAYIDX2]], align 4
; CHECK-NEXT: [[CALL2:%.*]] = tail call float @llvm.powi.f32.i32(float [[I2]], i32 [[P]])
; CHECK-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds float, ptr [[A]], i32 2
; CHECK-NEXT: [[I4:%.*]] = load float, ptr [[ARRAYIDX4]], align 4
; CHECK-NEXT: [[CALL3:%.*]] = tail call float @llvm.powi.f32.i32(float [[I4]], i32 [[P]])
; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds float, ptr [[A]], i32 3
; CHECK-NEXT: [[I6:%.*]] = load float, ptr [[ARRAYIDX6]], align 4
; CHECK-NEXT: [[CALL4:%.*]] = tail call float @llvm.powi.f32.i32(float [[I6]], i32 [[P]])
; CHECK-NEXT: store float [[CALL1]], ptr [[C:%.*]], align 4
; CHECK-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, ptr [[C]], i32 1
; CHECK-NEXT: store float [[CALL2]], ptr [[ARRAYIDX8]], align 4
; CHECK-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds float, ptr [[C]], i32 2
; CHECK-NEXT: store float [[CALL3]], ptr [[ARRAYIDX9]], align 4
; CHECK-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds float, ptr [[C]], i32 3
; CHECK-NEXT: store float [[CALL4]], ptr [[ARRAYIDX10]], align 4
; CHECK-NEXT: ret void
;
entry:
%i0 = load float, ptr %a, align 4
%call1 = tail call float @llvm.powi.f32.i32(float %i0,i32 %P)
%arrayidx2 = getelementptr inbounds float, ptr %a, i32 1
%i2 = load float, ptr %arrayidx2, align 4
%call2 = tail call float @llvm.powi.f32.i32(float %i2,i32 %P)
%arrayidx4 = getelementptr inbounds float, ptr %a, i32 2
%i4 = load float, ptr %arrayidx4, align 4
%call3 = tail call float @llvm.powi.f32.i32(float %i4,i32 %P)
%arrayidx6 = getelementptr inbounds float, ptr %a, i32 3
%i6 = load float, ptr %arrayidx6, align 4
%call4 = tail call float @llvm.powi.f32.i32(float %i6,i32 %P)
store float %call1, ptr %c, align 4
%arrayidx8 = getelementptr inbounds float, ptr %c, i32 1
store float %call2, ptr %arrayidx8, align 4
%arrayidx9 = getelementptr inbounds float, ptr %c, i32 2
store float %call3, ptr %arrayidx9, align 4
%arrayidx10 = getelementptr inbounds float, ptr %c, i32 3
store float %call4, ptr %arrayidx10, align 4
ret void
}
|