diff options
| author | Nadav Rotem <nrotem@apple.com> | 2013-04-12 21:15:03 +0000 |
|---|---|---|
| committer | Nadav Rotem <nrotem@apple.com> | 2013-04-12 21:15:03 +0000 |
| commit | 87a0af6e1b46abd3efa4ceb70186f6af5bc22c13 (patch) | |
| tree | 05adc2f493baff34f624811be5dcf634a567a5e7 /llvm/test/Transforms/BBVectorize | |
| parent | 4da0ab1d6873333bc5a73b62a7f19a62770703e3 (diff) | |
| download | bcm5719-llvm-87a0af6e1b46abd3efa4ceb70186f6af5bc22c13.tar.gz bcm5719-llvm-87a0af6e1b46abd3efa4ceb70186f6af5bc22c13.zip | |
CostModel: increase the default cost of supported floating point operations from 1 to two. Fixed a few tests that changes because now the cost of one insert + a vector operation on two doubles is lower than two scalar operations on doubles.
llvm-svn: 179413
Diffstat (limited to 'llvm/test/Transforms/BBVectorize')
| -rw-r--r-- | llvm/test/Transforms/BBVectorize/X86/loop1.ll | 10 | ||||
| -rw-r--r-- | llvm/test/Transforms/BBVectorize/X86/simple.ll | 23 |
2 files changed, 29 insertions, 4 deletions
diff --git a/llvm/test/Transforms/BBVectorize/X86/loop1.ll b/llvm/test/Transforms/BBVectorize/X86/loop1.ll index 493f23b0985..bbf565d1cc7 100644 --- a/llvm/test/Transforms/BBVectorize/X86/loop1.ll +++ b/llvm/test/Transforms/BBVectorize/X86/loop1.ll @@ -34,7 +34,15 @@ for.body: ; preds = %for.body, %entry %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond = icmp eq i32 %lftr.wideiv, 10 br i1 %exitcond, label %for.end, label %for.body -; CHECK-NOT: <2 x double> +; CHECK: insertelement +; CHECK-NEXT: insertelement +; CHECK-NEXT: fadd <2 x double> +; CHECK-NEXT: insertelement +; CHECK-NEXT: insertelement +; CHECK-NEXT: fadd <2 x double> +; CHECK-NEXT: insertelement +; CHECK-NEXT: fmul <2 x double> + ; CHECK-UNRL: %mul = fmul <2 x double> %2, %2 ; CHECK-UNRL: %mul3 = fmul <2 x double> %2, %3 ; CHECK-UNRL: %add = fadd <2 x double> %mul, %mul3 diff --git a/llvm/test/Transforms/BBVectorize/X86/simple.ll b/llvm/test/Transforms/BBVectorize/X86/simple.ll index 0113e38bb1c..8abfa5f8bd2 100644 --- a/llvm/test/Transforms/BBVectorize/X86/simple.ll +++ b/llvm/test/Transforms/BBVectorize/X86/simple.ll @@ -12,7 +12,11 @@ define double @test1(double %A1, double %A2, double %B1, double %B2) { %R = fmul double %Z1, %Z2 ret double %R ; CHECK: @test1 -; CHECK-NOT: fmul <2 x double> +; CHECK: fsub <2 x double> +; CHECK: fmul <2 x double> +; CHECK: fadd <2 x double> +; CHECK: extract +; CHECK: extract ; CHECK: ret double %R } @@ -63,7 +67,12 @@ define double @test2(double %A1, double %A2, double %B1, double %B2) { %R = fmul double %Z1, %Z2 ret double %R ; CHECK: @test2 -; CHECK-NOT: fmul <2 x double> +; CHECK: insertelement +; CHECK: insertelement +; CHECK: insertelement +; CHECK: insertelement +; CHECK: fsub <2 x double> +; CHECK: fmul <2 x double> ; CHECK: ret double %R } @@ -80,7 +89,15 @@ define double @test4(double %A1, double %A2, double %B1, double %B2) { %R = fmul double %Z1, %Z2 ret double %R ; CHECK: @test4 -; CHECK-NOT: fmul <2 x double> +; CHECK: insertelement +; CHECK: insertelement +; CHECK: insertelement +; CHECK: insertelement +; CHECK: fsub <2 x double> +; CHECK: fmul <2 x double> +; CHECK: insertelement +; CHECK: insertelement +; CHECK: fadd <2 x double> ; CHECK: ret double %R } |

