Ehsan Amiri | a538b0f | 2016-08-03 18:17:35 +0000 | [diff] [blame] | 1 | ; RUN: llc -verify-machineinstrs -mcpu=a2 < %s | FileCheck %s |
Hal Finkel | e5aaf3f | 2015-02-20 05:08:21 +0000 | [diff] [blame] | 2 | target datalayout = "E-m:e-i64:64-n32:64" |
| 3 | target triple = "powerpc64-bgq-linux" |
| 4 | |
| 5 | ; Function Attrs: nounwind |
| 6 | define void @foo(double* nocapture %a, double* nocapture readonly %b) #0 { |
| 7 | entry: |
| 8 | br label %for.body |
| 9 | |
| 10 | for.body: ; preds = %for.body, %entry |
| 11 | %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 12 | %arrayidx = getelementptr inbounds double, double* %b, i64 %indvars.iv |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 13 | %0 = load double, double* %arrayidx, align 8 |
Hal Finkel | e5aaf3f | 2015-02-20 05:08:21 +0000 | [diff] [blame] | 14 | %add = fadd double %0, 1.000000e+00 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 15 | %arrayidx2 = getelementptr inbounds double, double* %a, i64 %indvars.iv |
Hal Finkel | e5aaf3f | 2015-02-20 05:08:21 +0000 | [diff] [blame] | 16 | store double %add, double* %arrayidx2, align 8 |
| 17 | %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 |
| 18 | %exitcond = icmp eq i64 %indvars.iv.next, 1600 |
| 19 | br i1 %exitcond, label %for.end, label %for.body |
| 20 | |
| 21 | for.end: ; preds = %for.body |
| 22 | ret void |
| 23 | |
| 24 | ; CHECK-LABEL: @foo |
| 25 | ; CHECK: dcbt |
| 26 | } |
| 27 | |
| 28 | attributes #0 = { nounwind } |
| 29 | |