[llvm-commits] [PATCH] Adding the Linpack test to the test suite

Duncan Sands baldrick at free.fr
Mon Nov 26 05:21:49 PST 2012


Hi Renato,

On 26/11/12 14:12, Renato Golin wrote:
> On 26 November 2012 05:29, Duncan Sands <baldrick at free.fr> wrote:
>> LivermoreLoops is more interesting.  With dragonegg it works fine as long as
>> you don't do link-time optimization (which the testsuite does by default).  In
>> fact to get the failures it is enough to run "internalize" and then some standard
>> set of optimization passes.  I didn't get to the bottom of this yet.
>
> Hi Duncan,
>
> This makes a lot more sense than my previous assumption they had to do
> with random numbers (since if they did, it wouldn't pass every single
> time on my machine).
>
> I'll dig the failing tests for more info and try to reproduce this
> behaviour on my machine. Is there a way of getting the configuration
> used for that test-suite run?

I've attached the dragonegg generated IR file.  Here's what happens on my
machine:

$ lli kernel01.ll
114.305175

Which is correct.

$ opt -std-link-opts kernel01.ll -o - | lli
-520779438942085797417621673404093110237783362328307722282109763584.000000

Some kind of random number.

Ciao, Duncan.
-------------- next part --------------
; ModuleID = 'kernel01.c'
target datalayout = "e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

module asm "\09.ident\09\22GCC: (GNU) 4.6.4 20120613 (prerelease) LLVM: 3.3svn\22"

%struct.Parameters = type { i64, i64, i64, double, [3 x [25 x double]], [3 x [25 x i64]], [3 x [25 x double]], [3 x [25 x double]], [3 x [25 x double]], [25 x i64], [3 x [25 x i64]], [3 x [25 x i64]], double, double, double, i64, i64, i64, [3 x [25 x i64]], i64, i64, i64, i64, i64, i64, double, i64 }
%struct.Arrays = type { [1001 x double], [1001 x double], [1001 x double], [1001 x double], [1001 x double], [1001 x double], [1001 x double], [101 x double], [101 x double], [101 x double], [1001 x double], [1001 x double], [1001 x double], [1001 x double], [1001 x double], [1001 x double], [1001 x double], [1001 x double], [1001 x double], [2048 x double], [101 x double], [101 x double], [101 x double], [101 x double], [101 x double], [101 x double], [101 x double], [101 x double], [300 x double], [300 x double], [101 x double], [101 x double], [512 x [4 x double]], [101 x [25 x double]], [101 x [25 x double]], [25 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [64 x [64 x double]], [64 x [64 x double]], [64 x [64 x double]], [2 x [101 x [5 x double]]], [2 x [101 x [5 x double]]], [2 x [101 x [5 x double]]], [40 x double], [96 x i64], [96 x i64], [1001 x i64], [1001 x i64], [301 x i64], [1001 x double], [1001 x double], [101 x [25 x double]], [512 x [4 x double]], [64 x [64 x double]], [2048 x double], [101 x double], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [7 x [101 x double]], [101 x [25 x double]], double, double }

@as2 = common global %struct.Parameters zeroinitializer, align 32
@as1 = common global %struct.Arrays zeroinitializer, align 32
@"\01.LC0" = internal unnamed_addr constant [3 x [25 x i64]] [[25 x i64] [i64 0, i64 1001, i64 101, i64 1001, i64 1001, i64 1001, i64 64, i64 995, i64 100, i64 101, i64 101, i64 1001, i64 1000, i64 64, i64 1001, i64 101, i64 75, i64 101, i64 100, i64 101, i64 1000, i64 101, i64 101, i64 100, i64 1001], [25 x i64] [i64 0, i64 101, i64 101, i64 101, i64 101, i64 101, i64 32, i64 101, i64 100, i64 101, i64 101, i64 101, i64 100, i64 32, i64 101, i64 101, i64 40, i64 101, i64 100, i64 101, i64 100, i64 50, i64 101, i64 100, i64 101], [25 x i64] [i64 0, i64 27, i64 15, i64 27, i64 27, i64 27, i64 8, i64 21, i64 14, i64 15, i64 15, i64 27, i64 26, i64 8, i64 27, i64 15, i64 15, i64 15, i64 14, i64 15, i64 26, i64 20, i64 15, i64 14, i64 27]], align 32
@"\01.LC1" = internal unnamed_addr constant [3 x [25 x i64]] [[25 x i64] [i64 0, i64 7, i64 67, i64 9, i64 14, i64 10, i64 3, i64 4, i64 10, i64 36, i64 34, i64 11, i64 12, i64 36, i64 2, i64 1, i64 25, i64 35, i64 2, i64 39, i64 1, i64 1, i64 11, i64 8, i64 5], [25 x i64] [i64 0, i64 40, i64 40, i64 53, i64 70, i64 55, i64 7, i64 22, i64 6, i64 21, i64 19, i64 64, i64 68, i64 41, i64 10, i64 1, i64 27, i64 20, i64 1, i64 23, i64 8, i64 1, i64 7, i64 5, i64 31], [25 x i64] [i64 0, i64 28, i64 46, i64 37, i64 38, i64 40, i64 21, i64 20, i64 9, i64 26, i64 25, i64 46, i64 48, i64 31, i64 8, i64 1, i64 14, i64 26, i64 2, i64 28, i64 7, i64 1, i64 8, i64 7, i64 23]], align 32
@"\01.LC2" = internal unnamed_addr constant [3 x [25 x double]] [[25 x double] [double 0.000000e+00, double 0x40E8F950DCA103DA, double 0x40980EE322991657, double 0x402403CDB6317EE1, double 0x3FE3329609D9D208, double 0x40B1C4DF23F49B1E, double 0x40B1171DC8C4AA5A, double 0x40EDCE5058140C8C, double 0x41025376678D5A95, double 0x40FD0A05C6A55004, double 0x40F1D8FB2A5DAFD3, double 0x417FE1675B9FBF9B, double 0x3EFE7BCC490B4000, double 0x423BFFA934D847C2, double 0x41E795D0328002BC, double 0x40E341C557460D39, double 5.650760e+05, double 0x40916A912CEA6E8C, double 0x40F8CC4B428F99E6, double 0x4080F1741D0A4850, double 0x417CFF72B64BD3A6, double 0x41A30A9918245CB8, double 0x40725DC45A46BA4B, double 0x40E1556029168D32, double 5.000000e+02], [25 x double] [double 0.000000e+00, double 0x40806AAD02BEF8C0, double 0x40980EE322991657, double 0x3FF027E6A2F85CCE, double 0x3FE3329609D9D208, double 0x4046F1F5FC686DA7, double 0x40559445BCDBF6EF, double 0x4083D47813D53E1E, double 0x41025376678D5A95, double 0x40FD0A05C6A55004, double 0x40F1D8FB2A5DAFD3, double 0x40E0C3F354949605, double 0x3EDDE52B48C68000, double 0x4236DB05E8DD7186, double 0x417CFDD5AA6C5AF5, double 0x40E341C557460D39, double 6.480410e+05, double 0x40916A912CEA6E8C, double 0x40F8CC4B428F99E6, double 0x4080F1741D0A4850, double 0x40DE8783507F4345, double 0x4192A7B60316DB4C, double 0x40725DC45A46BA4B, double 0x40E1556029168D32, double 5.000000e+01], [25 x double] [double 0.000000e+00, double 0x40434688A4B4641B, double 0x4043C4385B4E9EB1, double 0x3FD1468C4A82BCF5, double 0x3FE3329609D9D208, double 0x400975FEFBBEA9AF, double 0x3FF1ECC98AE57BDC, double 0x403C750B33AB788A, double 0x40A721165BA2BE0C, double 0x40A47FEFDA1A8CB8, double 0x4099CD2A3797FEF3, double 0x408478EDD771DDCE, double 0x3EC04D7F3AC38000, double 0x4221EA21221EFD10, double 0x41464E0A4CA148D2, double 0x409153FD3919CE5D, double 5.152160e+05, double 0x403D79437F74FAE1, double 0x408E508458232B16, double 0x40295D57572E3F05, double 0x4082B62BAC6A01D9, double 0x4187E3A805B24586, double 0x4018709BA46DE7E8, double 0x407E508B82C97347, double 1.300000e+01]], align 32
@"\01.LC3" = internal unnamed_addr constant [25 x double] [double 0.000000e+00, double 5.000000e+00, double 4.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 1.600000e+01, double 3.600000e+01, double 1.700000e+01, double 9.000000e+00, double 1.000000e+00, double 1.000000e+00, double 7.000000e+00, double 1.100000e+01, double 3.300000e+01, double 1.000000e+01, double 9.000000e+00, double 4.400000e+01, double 6.000000e+00, double 2.600000e+01, double 2.000000e+00, double 1.700000e+01, double 1.100000e+01, double 1.000000e+00], align 32
@.cst = linker_private unnamed_addr constant [4 x i8] c"%f\0A\00", align 8

define void @iqranf(...) nounwind uwtable {
entry:
  %seed2 = alloca [3 x i64], align 8
  %seed2.sub = getelementptr inbounds [3 x i64]* %seed2, i64 0, i64 0
  store i64 256, i64* %seed2.sub, align 8, !tbaa !0
  %0 = getelementptr inbounds [3 x i64]* %seed2, i64 0, i64 1
  store i64 12491249, i64* %0, align 8, !tbaa !0
  %1 = getelementptr inbounds [3 x i64]* %seed2, i64 0, i64 2
  store i64 1499352848, i64* %1, align 8, !tbaa !0
  %2 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 23), align 8, !tbaa !0
  %3 = getelementptr inbounds [3 x i64]* %seed2, i64 0, i64 %2
  %4 = load i64* %3, align 8, !tbaa !0
  %5 = sitofp i64 %4 to double
  br label %"3"

"3":                                              ; preds = %"3", %entry
  %6 = phi double [ %5, %entry ], [ %13, %"3" ]
  %7 = phi i64 [ 0, %entry ], [ %22, %"3" ]
  %8 = fmul double %6, 1.680700e+04
  %9 = fdiv double %8, 0x41DFFFFFFFC00000
  %10 = fptosi double %9 to i64
  %11 = sitofp i64 %10 to double
  %12 = fmul double %11, 0x41DFFFFFFFC00000
  %13 = fsub double %8, %12
  %14 = fmul double %13, 1.000000e+03
  %15 = fdiv double %14, 0x41DFFFFFFFC00000
  %16 = fptosi double %15 to i64
  %17 = add nsw i64 %16, 1
  %18 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 58, i64 %7
  %19 = icmp slt i64 %16, 0
  %20 = icmp sgt i64 %17, 1001
  %21 = or i1 %19, %20
  %22 = add nsw i64 %7, 1
  %. = select i1 %21, i64 %22, i64 %17
  store i64 %., i64* %18, align 8
  %exitcond = icmp eq i64 %22, 1001
  br i1 %exitcond, label %return, label %"3"

return:                                           ; preds = %"3"
  ret void
}

define void @init(i64 %which) nounwind uwtable {
entry:
  br label %"3"

"3":                                              ; preds = %"3", %entry
  %0 = phi double [ 0x3FF0050E779207D5, %entry ], [ %6, %"3" ]
  %1 = phi double [ 1.234500e-03, %entry ], [ %7, %"3" ]
  %2 = phi i64 [ 0, %entry ], [ %11, %"3" ]
  %3 = icmp eq i64 %2, 19977
  %. = select i1 %3, double 1.234500e-03, double %1
  %.2 = select i1 %3, double 0x3FF0050E779207D5, double %0
  %4 = fsub double 1.000000e+00, %.
  %5 = fmul double %4, %.2
  %6 = fadd double %., %5
  %7 = fsub double -0.000000e+00, %.
  %8 = fadd double %6, 0xBF563FA7B5BC0F10
  %9 = fmul double %8, 1.000000e-01
  %10 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 0, i64 %2
  store double %9, double* %10, align 8, !tbaa !2
  %11 = add nsw i64 %2, 1
  %exitcond48 = icmp eq i64 %11, 54109
  br i1 %exitcond48, label %"8", label %"3"

"8":                                              ; preds = %"3", %"8"
  %12 = phi double [ %17, %"8" ], [ 0x3FF0050E779207D5, %"3" ]
  %13 = phi double [ %18, %"8" ], [ 1.234500e-03, %"3" ]
  %14 = phi i64 [ %22, %"8" ], [ 1, %"3" ]
  %15 = fsub double 1.000000e+00, %13
  %16 = fmul double %15, %12
  %17 = fadd double %13, %16
  %18 = fsub double -0.000000e+00, %13
  %19 = fadd double %17, 0xBF563FA7B5BC0F10
  %20 = fmul double %19, 1.000000e-01
  %21 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 55, i64 %14
  store double %20, double* %21, align 8, !tbaa !2
  %22 = add nsw i64 %14, 1
  %exitcond47 = icmp eq i64 %22, 40
  br i1 %exitcond47, label %"13.preheader", label %"8"

"12":                                             ; preds = %"12", %"13.preheader"
  %23 = phi double [ %29, %"13.preheader" ], [ %26, %"12" ]
  %24 = phi i64 [ 0, %"13.preheader" ], [ %27, %"12" ]
  %25 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 32, i64 %24, i64 %30
  store double %23, double* %25, align 8, !tbaa !2
  %26 = fadd double %23, 5.000000e-01
  %27 = add nsw i64 %24, 1
  %exitcond43 = icmp eq i64 %27, 512
  br i1 %exitcond43, label %"14", label %"12"

"14":                                             ; preds = %"12"
  %28 = add nsw i64 %30, 1
  %exitcond44 = icmp eq i64 %28, 4
  br i1 %exitcond44, label %"17", label %"13.preheader"

"13.preheader":                                   ; preds = %"8", %"14"
  %29 = phi double [ %26, %"14" ], [ 1.000000e+00, %"8" ]
  %30 = phi i64 [ %28, %"14" ], [ 0, %"8" ]
  br label %"12"

"17":                                             ; preds = %"14", %"17"
  %31 = phi i64 [ %34, %"17" ], [ 0, %"14" ]
  %32 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 56, i64 %31
  store i64 1, i64* %32, align 8, !tbaa !0
  %33 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 57, i64 %31
  store i64 1, i64* %33, align 8, !tbaa !0
  %34 = add nsw i64 %31, 1
  %exitcond41 = icmp eq i64 %34, 96
  br i1 %exitcond41, label %"19", label %"17"

"19":                                             ; preds = %"17"
  tail call void (...)* @iqranf() nounwind uwtable
  br label %"20"

"20":                                             ; preds = %"20", %"19"
  %35 = phi i64 [ 0, %"19" ], [ %45, %"20" ]
  %36 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 11, i64 %35
  %37 = load double* %36, align 8, !tbaa !2
  %38 = fmul double %37, -1.000000e+02
  store double %38, double* %36, align 8, !tbaa !2
  %39 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 58, i64 %35
  %40 = load i64* %39, align 8, !tbaa !0
  %41 = sitofp i64 %40 to double
  %42 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 10, i64 %35
  store double %41, double* %42, align 8, !tbaa !2
  %43 = fmul double %41, 0x3F563FA7B5BC0F10
  %44 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 4, i64 %35
  store double %43, double* %44, align 8, !tbaa !2
  %45 = add nsw i64 %35, 1
  %exitcond40 = icmp eq i64 %45, 1001
  br i1 %exitcond40, label %"22", label %"20"

"22":                                             ; preds = %"20"
  store double 1.000000e-03, double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 55, i64 27), align 8, !tbaa !2
  store double 0x3FF0511EE7C6AC93, double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 29, i64 0), align 8, !tbaa !2
  %46 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 24), align 32, !tbaa !0
  br label %"23"

"23":                                             ; preds = %"23", %"22"
  %47 = phi double [ 0x3FF0511EE7C6AC93, %"22" ], [ %50, %"23" ]
  %48 = phi i64 [ 1, %"22" ], [ %52, %"23" ]
  %49 = fdiv double 1.000000e-04, %47
  %50 = fadd double %47, %49
  %51 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 29, i64 %48
  store double %50, double* %51, align 8, !tbaa !2
  %52 = add nsw i64 %48, 1
  %exitcond39 = icmp eq i64 %52, 300
  br i1 %exitcond39, label %"25", label %"23"

"25":                                             ; preds = %"23"
  %53 = add nsw i64 %46, -1
  %54 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 29, i64 %53
  %55 = load double* %54, align 8, !tbaa !2
  %56 = shl nsw i64 %46, 1
  %57 = icmp slt i64 %46, 1
  br i1 %57, label %"34", label %"25.25.split_crit_edge"

"25.25.split_crit_edge":                          ; preds = %"25"
  %58 = add i64 %46, 1
  br label %"26.26.split_crit_edge"

"26.26.split_crit_edge":                          ; preds = %"25.25.split_crit_edge", %"32"
  %59 = phi i64 [ 1, %"25.25.split_crit_edge" ], [ %77, %"32" ]
  %60 = add nsw i64 %59, -1
  %61 = mul nsw i64 %60, %56
  br label %"28.lr.ph"

"28":                                             ; preds = %"28.lr.ph", %"28"
  %62 = phi i64 [ %75, %"28.lr.ph" ], [ %64, %"28" ]
  %63 = phi i64 [ 1, %"28.lr.ph" ], [ %72, %"28" ]
  %64 = add nsw i64 %62, 1
  %65 = sitofp i64 %63 to double
  %66 = fadd double %65, 1.000000e+00
  %67 = fdiv double %66, %65
  %68 = fmul double %55, %67
  %69 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 28, i64 %62
  store double %68, double* %69, align 8, !tbaa !2
  %70 = shl nsw i64 %63, 1
  %71 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 60, i64 %62
  store i64 %70, i64* %71, align 8, !tbaa !0
  %72 = add nsw i64 %63, 1
  %exitcond36 = icmp eq i64 %72, %58
  br i1 %exitcond36, label %"30", label %"28"

"30":                                             ; preds = %"28"
  %73 = add i64 %46, %75
  %74 = add nsw i64 %76, 1
  %exitcond37 = icmp eq i64 %74, 3
  br i1 %exitcond37, label %"32", label %"28.lr.ph"

"28.lr.ph":                                       ; preds = %"26.26.split_crit_edge", %"30"
  %75 = phi i64 [ %61, %"26.26.split_crit_edge" ], [ %73, %"30" ]
  %76 = phi i64 [ 1, %"26.26.split_crit_edge" ], [ %74, %"30" ]
  br label %"28"

"32":                                             ; preds = %"30"
  %77 = add nsw i64 %59, 1
  %exitcond38 = icmp eq i64 %77, 3
  br i1 %exitcond38, label %"34", label %"26.26.split_crit_edge"

"34":                                             ; preds = %"32", %"25"
  %78 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 60, i64 %56
  store i64 %46, i64* %78, align 8, !tbaa !0
  %79 = icmp eq i64 %which, 16
  br i1 %79, label %"36.thread", label %"36"

"36.thread":                                      ; preds = %"34"
  %80 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 0), align 32, !tbaa !0
  %81 = add nsw i64 %80, -1
  %82 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 29, i64 %81
  %83 = load double* %82, align 8, !tbaa !2
  store double %83, double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 55, i64 30), align 8, !tbaa !2
  %84 = add nsw i64 %80, -2
  %85 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 29, i64 %84
  %86 = load double* %85, align 8, !tbaa !2
  store double %86, double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 55, i64 32), align 8, !tbaa !2
  %87 = add nsw i64 %80, -3
  %88 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 29, i64 %87
  %89 = load double* %88, align 8, !tbaa !2
  store double %89, double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 55, i64 36), align 8, !tbaa !2
  call void @llvm.memset.p0i8.i64(i8* bitcast (i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 19) to i8*), i8 0, i64 16, i32 8, i1 false)
  store double 2.000000e+01, double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 55, i64 26), align 8, !tbaa !2
  br label %"41"

"36":                                             ; preds = %"34"
  store double 2.000000e+01, double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 55, i64 26), align 8, !tbaa !2
  switch i64 %which, label %"41" [
    i64 22, label %"37"
    i64 24, label %"39"
  ]

"37":                                             ; preds = %"36"
  %90 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 0), align 32, !tbaa !0
  %91 = add nsw i64 %90, -1
  %92 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 1, i64 %91
  %93 = load double* %92, align 8, !tbaa !2
  %94 = fmul double %93, 1.980000e+01
  %95 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 0, i64 %91
  store double %94, double* %95, align 8, !tbaa !2
  br label %"41"

"39":                                             ; preds = %"36"
  %96 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 0), align 32, !tbaa !0
  %97 = sdiv i64 %96, 2
  %98 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 3, i64 %97
  store double -1.000000e+10, double* %98, align 8, !tbaa !2
  br label %"41"

"41":                                             ; preds = %"36.thread", %"37", %"39", %"36", %"44"
  %99 = phi i64 [ %114, %"44" ], [ 0, %"36" ], [ 0, %"39" ], [ 0, %"37" ], [ 0, %"36.thread" ]
  %100 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 3, i64 %99
  %101 = load double* %100, align 8, !tbaa !2
  %102 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 61, i64 %99
  store double %101, double* %102, align 8, !tbaa !2
  %103 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 2, i64 %99
  %104 = load double* %103, align 8, !tbaa !2
  %105 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 62, i64 %99
  store double %104, double* %105, align 8, !tbaa !2
  br label %"42"

"42":                                             ; preds = %"42.42_crit_edge", %"41"
  %106 = phi double [ %101, %"41" ], [ %.pre, %"42.42_crit_edge" ]
  %107 = phi i64 [ 0, %"41" ], [ %113, %"42.42_crit_edge" ]
  %108 = fmul double %17, %106
  %109 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 34, i64 %99, i64 %107
  store double %108, double* %109, align 8, !tbaa !2
  %110 = load double* %103, align 8, !tbaa !2
  %111 = fmul double %110, %18
  %112 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 33, i64 %99, i64 %107
  store double %111, double* %112, align 8, !tbaa !2
  %113 = add nsw i64 %107, 1
  %exitcond33 = icmp eq i64 %113, 25
  br i1 %exitcond33, label %"44", label %"42.42_crit_edge"

"42.42_crit_edge":                                ; preds = %"42"
  %.pre = load double* %100, align 8, !tbaa !2
  br label %"42"

"44":                                             ; preds = %"42"
  %114 = add nsw i64 %99, 1
  %exitcond34 = icmp eq i64 %114, 1001
  br i1 %exitcond34, label %"49.preheader", label %"41"

"48":                                             ; preds = %"48", %"49.preheader"
  %115 = phi i64 [ 0, %"49.preheader" ], [ %119, %"48" ]
  %116 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 33, i64 %121, i64 %115
  %117 = load double* %116, align 8, !tbaa !2
  %118 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 63, i64 %121, i64 %115
  store double %117, double* %118, align 8, !tbaa !2
  %119 = add nsw i64 %115, 1
  %exitcond30 = icmp eq i64 %119, 25
  br i1 %exitcond30, label %"50", label %"48"

"50":                                             ; preds = %"48"
  %120 = add nsw i64 %121, 1
  %exitcond32 = icmp eq i64 %120, 101
  br i1 %exitcond32, label %"55.preheader", label %"49.preheader"

"49.preheader":                                   ; preds = %"44", %"50"
  %121 = phi i64 [ %120, %"50" ], [ 0, %"44" ]
  br label %"48"

"54":                                             ; preds = %"54", %"55.preheader"
  %122 = phi i64 [ 0, %"55.preheader" ], [ %126, %"54" ]
  %123 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 32, i64 %128, i64 %122
  %124 = load double* %123, align 8, !tbaa !2
  %125 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 64, i64 %128, i64 %122
  store double %124, double* %125, align 8, !tbaa !2
  %126 = add nsw i64 %122, 1
  %exitcond27 = icmp eq i64 %126, 4
  br i1 %exitcond27, label %"56", label %"54"

"56":                                             ; preds = %"54"
  %127 = add nsw i64 %128, 1
  %exitcond29 = icmp eq i64 %127, 512
  br i1 %exitcond29, label %"61.preheader", label %"55.preheader"

"55.preheader":                                   ; preds = %"50", %"56"
  %128 = phi i64 [ %127, %"56" ], [ 0, %"50" ]
  br label %"54"

"60":                                             ; preds = %"60", %"61.preheader"
  %129 = phi i64 [ 0, %"61.preheader" ], [ %133, %"60" ]
  %130 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 51, i64 %135, i64 %129
  %131 = load double* %130, align 8, !tbaa !2
  %132 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 65, i64 %135, i64 %129
  store double %131, double* %132, align 8, !tbaa !2
  %133 = add nsw i64 %129, 1
  %exitcond24 = icmp eq i64 %133, 64
  br i1 %exitcond24, label %"62", label %"60"

"62":                                             ; preds = %"60"
  %134 = add nsw i64 %135, 1
  %exitcond26 = icmp eq i64 %134, 64
  br i1 %exitcond26, label %"65", label %"61.preheader"

"61.preheader":                                   ; preds = %"56", %"62"
  %135 = phi i64 [ %134, %"62" ], [ 0, %"56" ]
  br label %"60"

"65":                                             ; preds = %"62", %"65"
  %136 = phi i64 [ %140, %"65" ], [ 0, %"62" ]
  %137 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 19, i64 %136
  %138 = load double* %137, align 8, !tbaa !2
  %139 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 66, i64 %136
  store double %138, double* %139, align 8, !tbaa !2
  %140 = add nsw i64 %136, 1
  %exitcond23 = icmp eq i64 %140, 2048
  br i1 %exitcond23, label %"68", label %"65"

"68":                                             ; preds = %"65", %"68"
  %141 = phi i64 [ %145, %"68" ], [ 0, %"65" ]
  %142 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 22, i64 %141
  %143 = load double* %142, align 8, !tbaa !2
  %144 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 67, i64 %141
  store double %143, double* %144, align 8, !tbaa !2
  %145 = add nsw i64 %141, 1
  %exitcond22 = icmp eq i64 %145, 101
  br i1 %exitcond22, label %"73.preheader", label %"68"

"72":                                             ; preds = %"72", %"73.preheader"
  %146 = phi i64 [ 0, %"73.preheader" ], [ %162, %"72" ]
  %147 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 43, i64 %164, i64 %146
  %148 = load double* %147, align 8, !tbaa !2
  %149 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 68, i64 %164, i64 %146
  store double %148, double* %149, align 8, !tbaa !2
  %150 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 46, i64 %164, i64 %146
  %151 = load double* %150, align 8, !tbaa !2
  %152 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 69, i64 %164, i64 %146
  store double %151, double* %152, align 8, !tbaa !2
  %153 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 47, i64 %164, i64 %146
  %154 = load double* %153, align 8, !tbaa !2
  %155 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 70, i64 %164, i64 %146
  store double %154, double* %155, align 8, !tbaa !2
  %156 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 48, i64 %164, i64 %146
  %157 = load double* %156, align 8, !tbaa !2
  %158 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 71, i64 %164, i64 %146
  store double %157, double* %158, align 8, !tbaa !2
  %159 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 40, i64 %164, i64 %146
  %160 = load double* %159, align 8, !tbaa !2
  %161 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 72, i64 %164, i64 %146
  store double %160, double* %161, align 8, !tbaa !2
  %162 = add nsw i64 %146, 1
  %exitcond = icmp eq i64 %162, 101
  br i1 %exitcond, label %"74", label %"72"

"74":                                             ; preds = %"72"
  %163 = add nsw i64 %164, 1
  %exitcond21 = icmp eq i64 %163, 7
  br i1 %exitcond21, label %"76", label %"73.preheader"

"73.preheader":                                   ; preds = %"68", %"74"
  %164 = phi i64 [ %163, %"74" ], [ 0, %"68" ]
  br label %"72"

"76":                                             ; preds = %"74"
  %165 = load double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 55, i64 35), align 8, !tbaa !2
  store double %165, double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 73), align 8, !tbaa !2
  %166 = load double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 17, i64 0), align 8, !tbaa !2
  store double %166, double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 74), align 16, !tbaa !2
  ret void
}

define i64 @parameters(i64 %which) nounwind uwtable {
entry:
  %0 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 23), align 8, !tbaa !0
  %1 = getelementptr inbounds [3 x [25 x i64]]* @"\01.LC0", i64 0, i64 %0, i64 %which
  %2 = load i64* %1, align 8, !tbaa !0
  store i64 %2, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 0), align 32, !tbaa !0
  %3 = getelementptr inbounds %struct.Parameters* @as2, i64 0, i32 11, i64 %0, i64 %which
  store i64 %2, i64* %3, align 8, !tbaa !0
  %4 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 23), align 8, !tbaa !0
  %5 = getelementptr inbounds [3 x [25 x i64]]* @"\01.LC0", i64 0, i64 %4, i64 16
  %6 = load i64* %5, align 8, !tbaa !0
  store i64 %6, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 24), align 32, !tbaa !0
  %7 = getelementptr inbounds [25 x double]* @"\01.LC3", i64 0, i64 %which
  %8 = load double* %7, align 8, !tbaa !2
  store double %8, double* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 3), align 8, !tbaa !2
  %9 = fptosi double %8 to i64
  %10 = getelementptr inbounds %struct.Parameters* @as2, i64 0, i32 9, i64 %which
  store i64 %9, i64* %10, align 8, !tbaa !0
  %11 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 23), align 8, !tbaa !0
  %12 = getelementptr inbounds [3 x [25 x i64]]* @"\01.LC1", i64 0, i64 %11, i64 %which
  %13 = load i64* %12, align 8, !tbaa !0
  store i64 %13, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 1), align 8, !tbaa !0
  %14 = getelementptr inbounds %struct.Parameters* @as2, i64 0, i32 10, i64 %11, i64 %which
  store i64 %13, i64* %14, align 8, !tbaa !0
  %15 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 1), align 8, !tbaa !0
  %16 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 2), align 16, !tbaa !0
  %17 = mul nsw i64 %16, %15
  store i64 %17, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 1), align 8, !tbaa !0
  %18 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 23), align 8, !tbaa !0
  %19 = getelementptr inbounds [3 x [25 x double]]* @"\01.LC2", i64 0, i64 %18, i64 %which
  %20 = load double* %19, align 8, !tbaa !2
  store double %20, double* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 25), align 8, !tbaa !2
  store i64 0, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 15), align 8, !tbaa !0
  tail call void @init(i64 %which) nounwind uwtable
  ret i64 0
}

define double @kernel01(...) nounwind uwtable {
entry:
  %0 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 23), align 8, !tbaa !0
  %1 = getelementptr inbounds [3 x [25 x i64]]* @"\01.LC0", i64 0, i64 %0, i64 1
  %2 = load i64* %1, align 8, !tbaa !0
  store i64 %2, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 0), align 32, !tbaa !0
  %3 = getelementptr inbounds %struct.Parameters* @as2, i64 0, i32 11, i64 %0, i64 1
  store i64 %2, i64* %3, align 8, !tbaa !0
  %4 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 23), align 8, !tbaa !0
  %5 = getelementptr inbounds [3 x [25 x i64]]* @"\01.LC0", i64 0, i64 %4, i64 16
  %6 = load i64* %5, align 8, !tbaa !0
  store i64 %6, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 24), align 32, !tbaa !0
  store double 5.000000e+00, double* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 3), align 8, !tbaa !2
  store i64 5, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 9, i64 1), align 8, !tbaa !0
  %7 = getelementptr inbounds [3 x [25 x i64]]* @"\01.LC1", i64 0, i64 %4, i64 1
  %8 = load i64* %7, align 8, !tbaa !0
  store i64 %8, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 1), align 8, !tbaa !0
  %9 = getelementptr inbounds %struct.Parameters* @as2, i64 0, i32 10, i64 %4, i64 1
  store i64 %8, i64* %9, align 8, !tbaa !0
  %10 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 1), align 8, !tbaa !0
  %11 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 2), align 16, !tbaa !0
  %12 = mul nsw i64 %11, %10
  store i64 %12, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 1), align 8, !tbaa !0
  %13 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 23), align 8, !tbaa !0
  %14 = getelementptr inbounds [3 x [25 x double]]* @"\01.LC2", i64 0, i64 %13, i64 1
  %15 = load double* %14, align 8, !tbaa !2
  store double %15, double* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 25), align 8, !tbaa !2
  store i64 0, i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 15), align 8, !tbaa !0
  call void @init(i64 1) nounwind uwtable
  %16 = load i64* getelementptr inbounds (%struct.Parameters* @as2, i64 0, i32 0), align 32, !tbaa !0
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %"4.lr.ph.us", label %"10"

"6.us":                                           ; preds = %"4.us"
  %18 = add i32 %36, 1
  %exitcond2 = icmp eq i32 %18, 100001
  br i1 %exitcond2, label %"9.preheader", label %"4.lr.ph.us"

"4.us":                                           ; preds = %"4.us", %"4.lr.ph.us"
  %19 = phi double [ %.pre, %"4.lr.ph.us" ], [ %29, %"4.us" ]
  %20 = phi i64 [ 0, %"4.lr.ph.us" ], [ %35, %"4.us" ]
  %21 = load double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 55, i64 28), align 8, !tbaa !2
  %22 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 4, i64 %20
  %23 = load double* %22, align 8, !tbaa !2
  %24 = load double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 55, i64 30), align 8, !tbaa !2
  %25 = fmul double %24, %19
  %26 = load double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 55, i64 36), align 8, !tbaa !2
  %27 = add nsw i64 %20, 11
  %28 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 5, i64 %27
  %29 = load double* %28, align 8, !tbaa !2
  %30 = fmul double %26, %29
  %31 = fadd double %25, %30
  %32 = fmul double %23, %31
  %33 = fadd double %21, %32
  %34 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 3, i64 %20
  store double %33, double* %34, align 8, !tbaa !2
  %35 = add nsw i64 %20, 1
  %exitcond = icmp eq i64 %35, %16
  br i1 %exitcond, label %"6.us", label %"4.us"

"4.lr.ph.us":                                     ; preds = %"6.us", %entry
  %36 = phi i32 [ %18, %"6.us" ], [ 0, %entry ]
  %.pre = load double* getelementptr inbounds (%struct.Arrays* @as1, i64 0, i32 5, i64 10), align 8, !tbaa !2
  br label %"4.us"

"9.preheader":                                    ; preds = %"6.us"
  br i1 %17, label %"8", label %"10"

"8":                                              ; preds = %"9.preheader", %"8"
  %37 = phi double [ %41, %"8" ], [ 0.000000e+00, %"9.preheader" ]
  %38 = phi i64 [ %42, %"8" ], [ 0, %"9.preheader" ]
  %39 = getelementptr inbounds %struct.Arrays* @as1, i64 0, i32 3, i64 %38
  %40 = load double* %39, align 8, !tbaa !2
  %41 = fadd double %37, %40
  %42 = add nsw i64 %38, 1
  %43 = icmp sgt i64 %16, %42
  br i1 %43, label %"8", label %"10"

"10":                                             ; preds = %entry, %"8", %"9.preheader"
  %.lcssa = phi double [ 0.000000e+00, %"9.preheader" ], [ %41, %"8" ], [ 0.000000e+00, %entry ]
  ret double %.lcssa
}

define i32 @main(i32 %argc, i8** nocapture %argv) unnamed_addr nounwind uwtable {
entry:
  %0 = tail call double (...)* @kernel01() nounwind uwtable
  %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.cst, i64 0, i64 0), double %0) nounwind
  ret i32 0
}

declare i32 @printf(i8* nocapture, ...) nounwind

declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind

!0 = metadata !{metadata !"alias set 2: long int", metadata !1}
!1 = metadata !{metadata !1}
!2 = metadata !{metadata !"alias set 3: double", metadata !1}


More information about the llvm-commits mailing list