From 69c8d681d34bd4501d72f306ec0af09d1f69e092 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Thu, 26 Jan 2017 09:18:41 +0000 Subject: [PATCH] [SLP] Add one more reduction operation for extra argument test to make it vectorizable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293162 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/SLPVectorizer/X86/horizontal-list.ll | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/Transforms/SLPVectorizer/X86/horizontal-list.ll b/test/Transforms/SLPVectorizer/X86/horizontal-list.ll index 5ab82fecd5f..faef3eade08 100644 --- a/test/Transforms/SLPVectorizer/X86/horizontal-list.ll +++ b/test/Transforms/SLPVectorizer/X86/horizontal-list.ll @@ -1035,7 +1035,10 @@ define float @extra_args_no_replace(float* nocapture readonly %x, i32 %a, i32 %b ; CHECK-NEXT: [[ARRAYIDX3_5:%.*]] = getelementptr inbounds float, float* [[X]], i64 6 ; CHECK-NEXT: [[TMP6:%.*]] = load float, float* [[ARRAYIDX3_5]], align 4 ; CHECK-NEXT: [[ADD4_5:%.*]] = fadd fast float [[TMP6]], [[ADD4_4]] -; CHECK-NEXT: ret float [[ADD4_5]] +; CHECK-NEXT: [[ARRAYIDX3_6:%.*]] = getelementptr inbounds float, float* [[X]], i64 7 +; CHECK-NEXT: [[TMP7:%.*]] = load float, float* [[ARRAYIDX3_6]], align 4 +; CHECK-NEXT: [[ADD4_6:%.*]] = fadd fast float [[TMP7]], [[ADD4_5]] +; CHECK-NEXT: ret float [[ADD4_6]] ; entry: %mul = mul nsw i32 %b, %a @@ -1064,6 +1067,9 @@ define float @extra_args_no_replace(float* nocapture readonly %x, i32 %a, i32 %b %arrayidx3.5 = getelementptr inbounds float, float* %x, i64 6 %6 = load float, float* %arrayidx3.5, align 4 %add4.5 = fadd fast float %6, %add4.4 - ret float %add4.5 + %arrayidx3.6 = getelementptr inbounds float, float* %x, i64 7 + %7 = load float, float* %arrayidx3.6, align 4 + %add4.6 = fadd fast float %7, %add4.5 + ret float %add4.6 } -- 2.11.0