forked from OSchip/llvm-project
[SLP][NFCAdd a test for vector intrinsic with scalar parameter, NFC.
This commit is contained in:
parent
12ab3e6c84
commit
e2a86ab847
|
@ -0,0 +1,52 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt < %s -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(float* %a, float* %c, i32 %P) {
|
||||
; CHECK-LABEL: @vec_powi_f32(
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: [[I0:%.*]] = load float, float* [[A:%.*]], align 4
|
||||
; CHECK-NEXT: [[CALL1:%.*]] = tail call float @llvm.powi.f32.i32(float [[I0]], i32 [[P:%.*]])
|
||||
; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds float, float* [[A]], i32 1
|
||||
; CHECK-NEXT: [[I2:%.*]] = load float, float* [[ARRAYIDX2]], align 4
|
||||
; CHECK-NEXT: [[CALL2:%.*]] = tail call float @llvm.powi.f32.i32(float [[I2]], i32 [[P]])
|
||||
; CHECK-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds float, float* [[A]], i32 2
|
||||
; CHECK-NEXT: [[I4:%.*]] = load float, float* [[ARRAYIDX4]], align 4
|
||||
; CHECK-NEXT: [[CALL3:%.*]] = tail call float @llvm.powi.f32.i32(float [[I4]], i32 [[P]])
|
||||
; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds float, float* [[A]], i32 3
|
||||
; CHECK-NEXT: [[I6:%.*]] = load float, float* [[ARRAYIDX6]], align 4
|
||||
; CHECK-NEXT: [[CALL4:%.*]] = tail call float @llvm.powi.f32.i32(float [[I6]], i32 [[P]])
|
||||
; CHECK-NEXT: store float [[CALL1]], float* [[C:%.*]], align 4
|
||||
; CHECK-NEXT: [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[C]], i32 1
|
||||
; CHECK-NEXT: store float [[CALL2]], float* [[ARRAYIDX8]], align 4
|
||||
; CHECK-NEXT: [[ARRAYIDX9:%.*]] = getelementptr inbounds float, float* [[C]], i32 2
|
||||
; CHECK-NEXT: store float [[CALL3]], float* [[ARRAYIDX9]], align 4
|
||||
; CHECK-NEXT: [[ARRAYIDX10:%.*]] = getelementptr inbounds float, float* [[C]], i32 3
|
||||
; CHECK-NEXT: store float [[CALL4]], float* [[ARRAYIDX10]], align 4
|
||||
; CHECK-NEXT: ret void
|
||||
;
|
||||
entry:
|
||||
%i0 = load float, float* %a, align 4
|
||||
%call1 = tail call float @llvm.powi.f32.i32(float %i0,i32 %P)
|
||||
|
||||
%arrayidx2 = getelementptr inbounds float, float* %a, i32 1
|
||||
%i2 = load float, float* %arrayidx2, align 4
|
||||
%call2 = tail call float @llvm.powi.f32.i32(float %i2,i32 %P)
|
||||
|
||||
%arrayidx4 = getelementptr inbounds float, float* %a, i32 2
|
||||
%i4 = load float, float* %arrayidx4, align 4
|
||||
%call3 = tail call float @llvm.powi.f32.i32(float %i4,i32 %P)
|
||||
|
||||
%arrayidx6 = getelementptr inbounds float, float* %a, i32 3
|
||||
%i6 = load float, float* %arrayidx6, align 4
|
||||
%call4 = tail call float @llvm.powi.f32.i32(float %i6,i32 %P)
|
||||
|
||||
store float %call1, float* %c, align 4
|
||||
%arrayidx8 = getelementptr inbounds float, float* %c, i32 1
|
||||
store float %call2, float* %arrayidx8, align 4
|
||||
%arrayidx9 = getelementptr inbounds float, float* %c, i32 2
|
||||
store float %call3, float* %arrayidx9, align 4
|
||||
%arrayidx10 = getelementptr inbounds float, float* %c, i32 3
|
||||
store float %call4, float* %arrayidx10, align 4
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue