On Sunday 26 June 2016 18:33:17 che fou wrote:
> MSElang seems better than Clang . how ? , they both uses llvm 3.8.1
>
Yes, MSElang produces per happenstance more optimal initial BC-code for the 
testcase it seems.
Changing the pascalcode to
"
program test;

procedure p();  
var
  n1, n2, n3, n4, n5, n6, n7, n8: int32;
  TicketsCount: int32;
  i1: int32;
begin
 for i1:= 0 to 9 do begin
  TicketsCount := 0;
  for n1 := 0 to 9 do
    for n2 := 0 to 9 do
      for n3 := 0 to 9 do
        for n4 := 0 to 9 do
          for n5 := 0 to 9 do
            for n6 := 0 to 9 do
              for n7 := 0 to 9 do
                for n8 := 0 to 9 do
                  if n1 + n2 + n3 + n4 = n5 + n6 + n7 + n8 then
                    inc(TicketsCount);
 end;
 writeln('Found ', TicketsCount, ' tickets.');
end;

begin
 p();
end.
"
lets disappear the difference.

Interesting is that changing the C-code to
"
#include <stdio.h>
#include <stdint.h>

 int n1, n2, n3, n4, n5, n6, n7, n8;
 int i1;
 int tickets_count;
        
int main()
{
 for (i1 = 0; i1 < 10; i1++){
  tickets_count = 0;
   for (n1 = 0; n1 < 10; n1++)
    for (n2 = 0; n2 < 10; n2++)
     for (n3 = 0; n3 < 10; n3++)
      for (n4 = 0; n4 < 10; n4++)
       for (n5 = 0; n5 < 10; n5++)
        for (n6 = 0; n6 < 10; n6++)
         for (n7 = 0; n7 < 10; n7++)
          for (n8 = 0; n8 < 10; n8++)
           if (n1 + n2 + n3 + n4 == n5 + n6 + n7 + n8)
            tickets_count++;
 }
 printf("Found %i tickets.",tickets_count);
 return 0;
} 
"
does not improve the Clang runtime. In attachment the BC-listings and 
resulting assembler code.

Martin
; ModuleID = 'benchmark.c'
target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
target triple = "i686-pc-linux-gnu"

@.str = private unnamed_addr constant [18 x i8] c"Found %i tickets.\00", align 1

; Function Attrs: nounwind
define i32 @main() #0 {
  %1 = alloca i32, align 4
  %n1 = alloca i32, align 4
  %n2 = alloca i32, align 4
  %n3 = alloca i32, align 4
  %n4 = alloca i32, align 4
  %n5 = alloca i32, align 4
  %n6 = alloca i32, align 4
  %n7 = alloca i32, align 4
  %n8 = alloca i32, align 4
  %i1 = alloca i32, align 4
  %tickets_count = alloca i32, align 4
  store i32 0, i32* %1, align 4
  store i32 0, i32* %i1, align 4
  br label %2

; <label>:2                                       ; preds = %89, %0
  %3 = load i32, i32* %i1, align 4
  %4 = icmp slt i32 %3, 10
  br i1 %4, label %5, label %92

; <label>:5                                       ; preds = %2
  store i32 0, i32* %tickets_count, align 4
  store i32 0, i32* %n1, align 4
  br label %6

; <label>:6                                       ; preds = %85, %5
  %7 = load i32, i32* %n1, align 4
  %8 = icmp slt i32 %7, 10
  br i1 %8, label %9, label %88

; <label>:9                                       ; preds = %6
  store i32 0, i32* %n2, align 4
  br label %10

; <label>:10                                      ; preds = %81, %9
  %11 = load i32, i32* %n2, align 4
  %12 = icmp slt i32 %11, 10
  br i1 %12, label %13, label %84

; <label>:13                                      ; preds = %10
  store i32 0, i32* %n3, align 4
  br label %14

; <label>:14                                      ; preds = %77, %13
  %15 = load i32, i32* %n3, align 4
  %16 = icmp slt i32 %15, 10
  br i1 %16, label %17, label %80

; <label>:17                                      ; preds = %14
  store i32 0, i32* %n4, align 4
  br label %18

; <label>:18                                      ; preds = %73, %17
  %19 = load i32, i32* %n4, align 4
  %20 = icmp slt i32 %19, 10
  br i1 %20, label %21, label %76

; <label>:21                                      ; preds = %18
  store i32 0, i32* %n5, align 4
  br label %22

; <label>:22                                      ; preds = %69, %21
  %23 = load i32, i32* %n5, align 4
  %24 = icmp slt i32 %23, 10
  br i1 %24, label %25, label %72

; <label>:25                                      ; preds = %22
  store i32 0, i32* %n6, align 4
  br label %26

; <label>:26                                      ; preds = %65, %25
  %27 = load i32, i32* %n6, align 4
  %28 = icmp slt i32 %27, 10
  br i1 %28, label %29, label %68

; <label>:29                                      ; preds = %26
  store i32 0, i32* %n7, align 4
  br label %30

; <label>:30                                      ; preds = %61, %29
  %31 = load i32, i32* %n7, align 4
  %32 = icmp slt i32 %31, 10
  br i1 %32, label %33, label %64

; <label>:33                                      ; preds = %30
  store i32 0, i32* %n8, align 4
  br label %34

; <label>:34                                      ; preds = %57, %33
  %35 = load i32, i32* %n8, align 4
  %36 = icmp slt i32 %35, 10
  br i1 %36, label %37, label %60

; <label>:37                                      ; preds = %34
  %38 = load i32, i32* %n1, align 4
  %39 = load i32, i32* %n2, align 4
  %40 = add nsw i32 %38, %39
  %41 = load i32, i32* %n3, align 4
  %42 = add nsw i32 %40, %41
  %43 = load i32, i32* %n4, align 4
  %44 = add nsw i32 %42, %43
  %45 = load i32, i32* %n5, align 4
  %46 = load i32, i32* %n6, align 4
  %47 = add nsw i32 %45, %46
  %48 = load i32, i32* %n7, align 4
  %49 = add nsw i32 %47, %48
  %50 = load i32, i32* %n8, align 4
  %51 = add nsw i32 %49, %50
  %52 = icmp eq i32 %44, %51
  br i1 %52, label %53, label %56

; <label>:53                                      ; preds = %37
  %54 = load i32, i32* %tickets_count, align 4
  %55 = add nsw i32 %54, 1
  store i32 %55, i32* %tickets_count, align 4
  br label %56

; <label>:56                                      ; preds = %53, %37
  br label %57

; <label>:57                                      ; preds = %56
  %58 = load i32, i32* %n8, align 4
  %59 = add nsw i32 %58, 1
  store i32 %59, i32* %n8, align 4
  br label %34

; <label>:60                                      ; preds = %34
  br label %61

; <label>:61                                      ; preds = %60
  %62 = load i32, i32* %n7, align 4
  %63 = add nsw i32 %62, 1
  store i32 %63, i32* %n7, align 4
  br label %30

; <label>:64                                      ; preds = %30
  br label %65

; <label>:65                                      ; preds = %64
  %66 = load i32, i32* %n6, align 4
  %67 = add nsw i32 %66, 1
  store i32 %67, i32* %n6, align 4
  br label %26

; <label>:68                                      ; preds = %26
  br label %69

; <label>:69                                      ; preds = %68
  %70 = load i32, i32* %n5, align 4
  %71 = add nsw i32 %70, 1
  store i32 %71, i32* %n5, align 4
  br label %22

; <label>:72                                      ; preds = %22
  br label %73

; <label>:73                                      ; preds = %72
  %74 = load i32, i32* %n4, align 4
  %75 = add nsw i32 %74, 1
  store i32 %75, i32* %n4, align 4
  br label %18

; <label>:76                                      ; preds = %18
  br label %77

; <label>:77                                      ; preds = %76
  %78 = load i32, i32* %n3, align 4
  %79 = add nsw i32 %78, 1
  store i32 %79, i32* %n3, align 4
  br label %14

; <label>:80                                      ; preds = %14
  br label %81

; <label>:81                                      ; preds = %80
  %82 = load i32, i32* %n2, align 4
  %83 = add nsw i32 %82, 1
  store i32 %83, i32* %n2, align 4
  br label %10

; <label>:84                                      ; preds = %10
  br label %85

; <label>:85                                      ; preds = %84
  %86 = load i32, i32* %n1, align 4
  %87 = add nsw i32 %86, 1
  store i32 %87, i32* %n1, align 4
  br label %6

; <label>:88                                      ; preds = %6
  br label %89

; <label>:89                                      ; preds = %88
  %90 = load i32, i32* %i1, align 4
  %91 = add nsw i32 %90, 1
  store i32 %91, i32* %i1, align 4
  br label %2

; <label>:92                                      ; preds = %2
  %93 = load i32, i32* %tickets_count, align 4
  %94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 
x i8]* @.str, i32 0, i32 0), i32 %93)
  ret i32 0
}

declare i32 @printf(i8*, ...) #1

attributes #0 = { nounwind "disable-tail-calls"="false" 
"less-precise-fpmad"="false" "no-frame-pointer-elim"="true" 
"no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" 
"no-nans-fp-math"="false" "stack-protector-buffer-size"="8" 
"target-cpu"="pentium4" "target-features"="+fxsr,+mmx,+sse,+sse2" 
"unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" 
"no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" 
"no-infs-fp-math"="false" "no-nans-fp-math"="false" 
"stack-protector-buffer-size"="8" "target-cpu"="pentium4" 
"target-features"="+fxsr,+mmx,+sse,+sse2" "unsafe-fp-math"="false" 
"use-soft-float"="false" }

!llvm.ident = !{!0}

!0 = !{!"clang version 3.8.1 (http://llvm.org/git/clang 
2cb088be9c6a3d1ef9a050d44e1b01393983fc4d) (http://llvm.org/git/llvm 
051e787f26dbfdc26cf61a57bc82ca00dcb812e8)"}
; ModuleID = 'benchmark_mse.bc'
target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
target triple = "i386-unknown-linux-gnu"

@__mla__system.1 = global i32 0
@0 = internal global i32 0
@1 = internal global i32 0
@2 = internal global i32 0
@3 = internal global i32 0
@4 = internal global i32 0
@5 = internal global i32 0
@6 = internal global i32 0
@7 = internal global i32 0
@8 = internal global i32 0
@9 = internal global i32 0
@10 = internal global [36 x i8] c"\FF\FF\FF\FF\06\00\00\00Found 
\00\00\FF\FF\FF\FF\09\00\00\00 tickets.\00\00\00"
@11 = internal constant [2 x i8] c"\0A\00"
@12 = internal constant [3 x i8] c"%u\00"
@13 = internal constant [5 x i8] c"%hhd\00"
@14 = internal constant [4 x i8] c"%hd\00"
@15 = internal constant [3 x i8] c"%d\00"
@16 = internal constant [5 x i8] c"%lld\00"
@17 = internal constant [3 x i8] c"%c\00"
@18 = internal constant [3 x i8] c"%s\00"
@19 = internal constant [3 x i8] c"%p\00"
@20 = internal constant [3 x i8] c"%e\00"

define i32 @main() {
  %1 = bitcast i32* @9 to i8*
  %2 = getelementptr i8, i8* %1, i8 0
  %3 = bitcast i32 0 to i32
  %4 = bitcast i32 9 to i32
  %5 = bitcast i32 %3 to i32
  %6 = bitcast i32 %4 to i32
  %7 = icmp sle i32 %3, %4
  br i1 %7, label %8, label %262

; <label>:8                                       ; preds = %0
  %9 = bitcast i8* %2 to i8*
  %10 = bitcast i32 %3 to i32
  %11 = bitcast i8* %9 to i32*
  store i32 %10, i32* %11
  %12 = bitcast i8* %2 to i8*
  %13 = bitcast i8* %12 to i32*
  %14 = load i32, i32* %13
  %15 = add i32 %14, -1
  store i32 %15, i32* %13
  br label %16

; <label>:16                                      ; preds = %257, %8
  %17 = bitcast i8* %2 to i8*
  %18 = bitcast i8* %17 to i32*
  %19 = load i32, i32* %18
  %20 = add i32 %19, 1
  store i32 %20, i32* %18
  %21 = bitcast i32 0 to i32
  store i32 %21, i32* @8
  %22 = bitcast i32* @0 to i8*
  %23 = getelementptr i8, i8* %22, i8 0
  %24 = bitcast i32 0 to i32
  %25 = bitcast i32 9 to i32
  %26 = bitcast i32 %24 to i32
  %27 = bitcast i32 %25 to i32
  %28 = icmp sle i32 %24, %25
  br i1 %28, label %29, label %255

; <label>:29                                      ; preds = %16
  %30 = bitcast i8* %23 to i8*
  %31 = bitcast i32 %24 to i32
  %32 = bitcast i8* %30 to i32*
  store i32 %31, i32* %32
  %33 = bitcast i8* %23 to i8*
  %34 = bitcast i8* %33 to i32*
  %35 = load i32, i32* %34
  %36 = add i32 %35, -1
  store i32 %36, i32* %34
  br label %37

; <label>:37                                      ; preds = %250, %29
  %38 = bitcast i8* %23 to i8*
  %39 = bitcast i8* %38 to i32*
  %40 = load i32, i32* %39
  %41 = add i32 %40, 1
  store i32 %41, i32* %39
  %42 = bitcast i32* @1 to i8*
  %43 = getelementptr i8, i8* %42, i8 0
  %44 = bitcast i32 0 to i32
  %45 = bitcast i32 9 to i32
  %46 = bitcast i32 %44 to i32
  %47 = bitcast i32 %45 to i32
  %48 = icmp sle i32 %44, %45
  br i1 %48, label %49, label %248

; <label>:49                                      ; preds = %37
  %50 = bitcast i8* %43 to i8*
  %51 = bitcast i32 %44 to i32
  %52 = bitcast i8* %50 to i32*
  store i32 %51, i32* %52
  %53 = bitcast i8* %43 to i8*
  %54 = bitcast i8* %53 to i32*
  %55 = load i32, i32* %54
  %56 = add i32 %55, -1
  store i32 %56, i32* %54
  br label %57

; <label>:57                                      ; preds = %243, %49
  %58 = bitcast i8* %43 to i8*
  %59 = bitcast i8* %58 to i32*
  %60 = load i32, i32* %59
  %61 = add i32 %60, 1
  store i32 %61, i32* %59
  %62 = bitcast i32* @2 to i8*
  %63 = getelementptr i8, i8* %62, i8 0
  %64 = bitcast i32 0 to i32
  %65 = bitcast i32 9 to i32
  %66 = bitcast i32 %64 to i32
  %67 = bitcast i32 %65 to i32
  %68 = icmp sle i32 %64, %65
  br i1 %68, label %69, label %241

; <label>:69                                      ; preds = %57
  %70 = bitcast i8* %63 to i8*
  %71 = bitcast i32 %64 to i32
  %72 = bitcast i8* %70 to i32*
  store i32 %71, i32* %72
  %73 = bitcast i8* %63 to i8*
  %74 = bitcast i8* %73 to i32*
  %75 = load i32, i32* %74
  %76 = add i32 %75, -1
  store i32 %76, i32* %74
  br label %77

; <label>:77                                      ; preds = %236, %69
  %78 = bitcast i8* %63 to i8*
  %79 = bitcast i8* %78 to i32*
  %80 = load i32, i32* %79
  %81 = add i32 %80, 1
  store i32 %81, i32* %79
  %82 = bitcast i32* @3 to i8*
  %83 = getelementptr i8, i8* %82, i8 0
  %84 = bitcast i32 0 to i32
  %85 = bitcast i32 9 to i32
  %86 = bitcast i32 %84 to i32
  %87 = bitcast i32 %85 to i32
  %88 = icmp sle i32 %84, %85
  br i1 %88, label %89, label %234

; <label>:89                                      ; preds = %77
  %90 = bitcast i8* %83 to i8*
  %91 = bitcast i32 %84 to i32
  %92 = bitcast i8* %90 to i32*
  store i32 %91, i32* %92
  %93 = bitcast i8* %83 to i8*
  %94 = bitcast i8* %93 to i32*
  %95 = load i32, i32* %94
  %96 = add i32 %95, -1
  store i32 %96, i32* %94
  br label %97

; <label>:97                                      ; preds = %229, %89
  %98 = bitcast i8* %83 to i8*
  %99 = bitcast i8* %98 to i32*
  %100 = load i32, i32* %99
  %101 = add i32 %100, 1
  store i32 %101, i32* %99
  %102 = bitcast i32* @4 to i8*
  %103 = getelementptr i8, i8* %102, i8 0
  %104 = bitcast i32 0 to i32
  %105 = bitcast i32 9 to i32
  %106 = bitcast i32 %104 to i32
  %107 = bitcast i32 %105 to i32
  %108 = icmp sle i32 %104, %105
  br i1 %108, label %109, label %227

; <label>:109                                     ; preds = %97
  %110 = bitcast i8* %103 to i8*
  %111 = bitcast i32 %104 to i32
  %112 = bitcast i8* %110 to i32*
  store i32 %111, i32* %112
  %113 = bitcast i8* %103 to i8*
  %114 = bitcast i8* %113 to i32*
  %115 = load i32, i32* %114
  %116 = add i32 %115, -1
  store i32 %116, i32* %114
  br label %117

; <label>:117                                     ; preds = %222, %109
  %118 = bitcast i8* %103 to i8*
  %119 = bitcast i8* %118 to i32*
  %120 = load i32, i32* %119
  %121 = add i32 %120, 1
  store i32 %121, i32* %119
  %122 = bitcast i32* @5 to i8*
  %123 = getelementptr i8, i8* %122, i8 0
  %124 = bitcast i32 0 to i32
  %125 = bitcast i32 9 to i32
  %126 = bitcast i32 %124 to i32
  %127 = bitcast i32 %125 to i32
  %128 = icmp sle i32 %124, %125
  br i1 %128, label %129, label %220

; <label>:129                                     ; preds = %117
  %130 = bitcast i8* %123 to i8*
  %131 = bitcast i32 %124 to i32
  %132 = bitcast i8* %130 to i32*
  store i32 %131, i32* %132
  %133 = bitcast i8* %123 to i8*
  %134 = bitcast i8* %133 to i32*
  %135 = load i32, i32* %134
  %136 = add i32 %135, -1
  store i32 %136, i32* %134
  br label %137

; <label>:137                                     ; preds = %215, %129
  %138 = bitcast i8* %123 to i8*
  %139 = bitcast i8* %138 to i32*
  %140 = load i32, i32* %139
  %141 = add i32 %140, 1
  store i32 %141, i32* %139
  %142 = bitcast i32* @6 to i8*
  %143 = getelementptr i8, i8* %142, i8 0
  %144 = bitcast i32 0 to i32
  %145 = bitcast i32 9 to i32
  %146 = bitcast i32 %144 to i32
  %147 = bitcast i32 %145 to i32
  %148 = icmp sle i32 %144, %145
  br i1 %148, label %149, label %213

; <label>:149                                     ; preds = %137
  %150 = bitcast i8* %143 to i8*
  %151 = bitcast i32 %144 to i32
  %152 = bitcast i8* %150 to i32*
  store i32 %151, i32* %152
  %153 = bitcast i8* %143 to i8*
  %154 = bitcast i8* %153 to i32*
  %155 = load i32, i32* %154
  %156 = add i32 %155, -1
  store i32 %156, i32* %154
  br label %157

; <label>:157                                     ; preds = %208, %149
  %158 = bitcast i8* %143 to i8*
  %159 = bitcast i8* %158 to i32*
  %160 = load i32, i32* %159
  %161 = add i32 %160, 1
  store i32 %161, i32* %159
  %162 = bitcast i32* @7 to i8*
  %163 = getelementptr i8, i8* %162, i8 0
  %164 = bitcast i32 0 to i32
  %165 = bitcast i32 9 to i32
  %166 = bitcast i32 %164 to i32
  %167 = bitcast i32 %165 to i32
  %168 = icmp sle i32 %164, %165
  br i1 %168, label %169, label %206

; <label>:169                                     ; preds = %157
  %170 = bitcast i8* %163 to i8*
  %171 = bitcast i32 %164 to i32
  %172 = bitcast i8* %170 to i32*
  store i32 %171, i32* %172
  %173 = bitcast i8* %163 to i8*
  %174 = bitcast i8* %173 to i32*
  %175 = load i32, i32* %174
  %176 = add i32 %175, -1
  store i32 %176, i32* %174
  br label %177

; <label>:177                                     ; preds = %201, %169
  %178 = bitcast i8* %163 to i8*
  %179 = bitcast i8* %178 to i32*
  %180 = load i32, i32* %179
  %181 = add i32 %180, 1
  store i32 %181, i32* %179
  %182 = load i32, i32* @0
  %183 = load i32, i32* @1
  %184 = add i32 %182, %183
  %185 = load i32, i32* @2
  %186 = add i32 %184, %185
  %187 = load i32, i32* @3
  %188 = add i32 %186, %187
  %189 = load i32, i32* @4
  %190 = load i32, i32* @5
  %191 = add i32 %189, %190
  %192 = load i32, i32* @6
  %193 = add i32 %191, %192
  %194 = load i32, i32* @7
  %195 = add i32 %193, %194
  %196 = icmp eq i32 %188, %195
  br i1 %196, label %197, label %200

; <label>:197                                     ; preds = %177
  %198 = load i32, i32* @8
  %199 = add i32 %198, 1
  store i32 %199, i32* @8
  br label %200

; <label>:200                                     ; preds = %197, %177
  br label %201

; <label>:201                                     ; preds = %200
  %202 = bitcast i8* %163 to i32*
  %203 = load i32, i32* %202
  %204 = bitcast i32 %165 to i32
  %205 = icmp sge i32 %203, %204
  br i1 %205, label %206, label %177

; <label>:206                                     ; preds = %201, %157
  br label %207

; <label>:207                                     ; preds = %206
  br label %208

; <label>:208                                     ; preds = %207
  %209 = bitcast i8* %143 to i32*
  %210 = load i32, i32* %209
  %211 = bitcast i32 %145 to i32
  %212 = icmp sge i32 %210, %211
  br i1 %212, label %213, label %157

; <label>:213                                     ; preds = %208, %137
  br label %214

; <label>:214                                     ; preds = %213
  br label %215

; <label>:215                                     ; preds = %214
  %216 = bitcast i8* %123 to i32*
  %217 = load i32, i32* %216
  %218 = bitcast i32 %125 to i32
  %219 = icmp sge i32 %217, %218
  br i1 %219, label %220, label %137

; <label>:220                                     ; preds = %215, %117
  br label %221

; <label>:221                                     ; preds = %220
  br label %222

; <label>:222                                     ; preds = %221
  %223 = bitcast i8* %103 to i32*
  %224 = load i32, i32* %223
  %225 = bitcast i32 %105 to i32
  %226 = icmp sge i32 %224, %225
  br i1 %226, label %227, label %117

; <label>:227                                     ; preds = %222, %97
  br label %228

; <label>:228                                     ; preds = %227
  br label %229

; <label>:229                                     ; preds = %228
  %230 = bitcast i8* %83 to i32*
  %231 = load i32, i32* %230
  %232 = bitcast i32 %85 to i32
  %233 = icmp sge i32 %231, %232
  br i1 %233, label %234, label %97

; <label>:234                                     ; preds = %229, %77
  br label %235

; <label>:235                                     ; preds = %234
  br label %236

; <label>:236                                     ; preds = %235
  %237 = bitcast i8* %63 to i32*
  %238 = load i32, i32* %237
  %239 = bitcast i32 %65 to i32
  %240 = icmp sge i32 %238, %239
  br i1 %240, label %241, label %77

; <label>:241                                     ; preds = %236, %57
  br label %242

; <label>:242                                     ; preds = %241
  br label %243

; <label>:243                                     ; preds = %242
  %244 = bitcast i8* %43 to i32*
  %245 = load i32, i32* %244
  %246 = bitcast i32 %45 to i32
  %247 = icmp sge i32 %245, %246
  br i1 %247, label %248, label %57

; <label>:248                                     ; preds = %243, %37
  br label %249

; <label>:249                                     ; preds = %248
  br label %250

; <label>:250                                     ; preds = %249
  %251 = bitcast i8* %23 to i32*
  %252 = load i32, i32* %251
  %253 = bitcast i32 %25 to i32
  %254 = icmp sge i32 %252, %253
  br i1 %254, label %255, label %37

; <label>:255                                     ; preds = %250, %16
  br label %256

; <label>:256                                     ; preds = %255
  br label %257

; <label>:257                                     ; preds = %256
  %258 = bitcast i8* %2 to i32*
  %259 = load i32, i32* %258
  %260 = bitcast i32 %4 to i32
  %261 = icmp sge i32 %259, %260
  br i1 %261, label %262, label %16

; <label>:262                                     ; preds = %257, %0
  br label %263

; <label>:263                                     ; preds = %262
  %264 = bitcast [36 x i8]* @10 to i8*
  %265 = getelementptr i8, i8* %264, i32 8
  %266 = bitcast i8* %265 to i8*
  %267 = getelementptr i8, i8* %266, i8 0
  %268 = load i32, i32* @8
  %269 = bitcast [36 x i8]* @10 to i8*
  %270 = getelementptr i8, i8* %269, i32 24
  %271 = bitcast i8* %270 to i8*
  %272 = getelementptr i8, i8* %271, i8 0
  %273 = bitcast [3 x i8]* @18 to i8*
  call void (i8*, ...) @printf(i8* %273, i8* %267)
  %274 = bitcast [3 x i8]* @15 to i8*
  call void (i8*, ...) @printf(i8* %274, i32 %268)
  %275 = bitcast [3 x i8]* @18 to i8*
  call void (i8*, ...) @printf(i8* %275, i8* %272)
  %276 = bitcast [2 x i8]* @11 to i8*
  call void (i8*, ...) @printf(i8* %276)
  %277 = load i32, i32* @__mla__system.1
  ret i32 %277
}

declare void @printf(i8*, ...)

declare i8* @malloc(i32)

declare void @free(i8*)

declare i8* @calloc(i32, i32)

declare i8* @realloc(i8*, i32)

declare i8* @memset(i8*, i32, i32)

declare i8* @memcpy(i8*, i8*, i32)

declare void @_exit(i32)

; Function Attrs: nounwind readnone
declare double @llvm.sin.f64(double) #0

attributes #0 = { nounwind readnone }
        .text
        .file   "benchmark.c"
        .globl  main
        .align  16, 0x90
        .type   main,@function
main:                                   # @main
# BB#0:
        pushl   %ebp
        pushl   %ebx
        pushl   %edi
        pushl   %esi
        subl    $60, %esp
        xorl    %eax, %eax
        .align  16, 0x90
.LBB0_1:                                # %.preheader7
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_2 Depth 2
                                        #       Child Loop BB0_3 Depth 3
                                        #         Child Loop BB0_4 Depth 4
                                        #           Child Loop BB0_5 Depth 5
                                        #             Child Loop BB0_6 Depth 6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %eax, 16(%esp)          # 4-byte Spill
        movl    $-9, %esi
        xorl    %ebx, %ebx
        xorl    %ecx, %ecx
        .align  16, 0x90
.LBB0_2:                                # %.preheader6
                                        #   Parent Loop BB0_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_3 Depth 3
                                        #         Child Loop BB0_4 Depth 4
                                        #           Child Loop BB0_5 Depth 5
                                        #             Child Loop BB0_6 Depth 6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %ecx, 20(%esp)          # 4-byte Spill
        movl    %esi, 24(%esp)          # 4-byte Spill
        xorl    %ecx, %ecx
        .align  16, 0x90
.LBB0_3:                                # %.preheader5
                                        #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB0_4 Depth 4
                                        #           Child Loop BB0_5 Depth 5
                                        #             Child Loop BB0_6 Depth 6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %esi, 28(%esp)          # 4-byte Spill
        movl    %ecx, 32(%esp)          # 4-byte Spill
        xorl    %ecx, %ecx
        .align  16, 0x90
.LBB0_4:                                # %.preheader4
                                        #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        # =>      This Loop Header: Depth=4
                                        #           Child Loop BB0_5 Depth 5
                                        #             Child Loop BB0_6 Depth 6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %ecx, 36(%esp)          # 4-byte Spill
        movl    %esi, 40(%esp)          # 4-byte Spill
        xorl    %ecx, %ecx
        .align  16, 0x90
.LBB0_5:                                # %.preheader3
                                        #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        #         Parent Loop BB0_4 Depth=4
                                        # =>        This Loop Header: Depth=5
                                        #             Child Loop BB0_6 Depth 6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %esi, 44(%esp)          # 4-byte Spill
        movl    %ecx, 48(%esp)          # 4-byte Spill
        xorl    %ecx, %ecx
        .align  16, 0x90
.LBB0_6:                                # %.preheader2
                                        #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        #         Parent Loop BB0_4 Depth=4
                                        #           Parent Loop BB0_5 Depth=5
                                        # =>          This Loop Header: Depth=6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %ecx, 52(%esp)          # 4-byte Spill
        movl    %esi, 56(%esp)          # 4-byte Spill
        xorl    %ebp, %ebp
        .align  16, 0x90
.LBB0_7:                                # %.preheader1
                                        #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        #         Parent Loop BB0_4 Depth=4
                                        #           Parent Loop BB0_5 Depth=5
                                        #             Parent Loop BB0_6 Depth=6
                                        # =>            This Loop Header: 
Depth=7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    $10, %ecx
        movl    %esi, %eax
        .align  16, 0x90
.LBB0_8:                                # %.preheader
                                        #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        #         Parent Loop BB0_4 Depth=4
                                        #           Parent Loop BB0_5 Depth=5
                                        #             Parent Loop BB0_6 Depth=6
                                        #               Parent Loop BB0_7 
Depth=7
                                        # =>              This Inner Loop 
Header: Depth=8
        cmpl    $-9, %eax
        sete    %dl
        movzbl  %dl, %edx
        addl    %ebx, %edx
        cmpl    $-8, %eax
        sete    %bl
        movzbl  %bl, %ebx
        addl    %edx, %ebx
        cmpl    $-7, %eax
        sete    %dl
        movzbl  %dl, %edx
        addl    %ebx, %edx
        cmpl    $-6, %eax
        sete    %bl
        movzbl  %bl, %ebx
        addl    %edx, %ebx
        cmpl    $-5, %eax
        sete    %dl
        movzbl  %dl, %edx
        addl    %ebx, %edx
        cmpl    $-4, %eax
        sete    %bl
        movzbl  %bl, %ebx
        addl    %edx, %ebx
        cmpl    $-3, %eax
        sete    %dl
        movzbl  %dl, %edx
        addl    %ebx, %edx
        cmpl    $-2, %eax
        sete    %bl
        movzbl  %bl, %edi
        addl    %edx, %edi
        cmpl    $-1, %eax
        sete    %dl
        movzbl  %dl, %ebx
        addl    %edi, %ebx
        cmpl    $1, %eax
        adcl    $0, %ebx
        decl    %eax
        decl    %ecx
        jne     .LBB0_8
# BB#9:                                 #   in Loop: Header=BB0_7 Depth=7
        incl    %ebp
        decl    %esi
        cmpl    $10, %ebp
        jne     .LBB0_7
# BB#10:                                #   in Loop: Header=BB0_6 Depth=6
        movl    52(%esp), %ecx          # 4-byte Reload
        incl    %ecx
        movl    56(%esp), %esi          # 4-byte Reload
        decl    %esi
        cmpl    $10, %ecx
        jne     .LBB0_6
# BB#11:                                #   in Loop: Header=BB0_5 Depth=5
        movl    48(%esp), %ecx          # 4-byte Reload
        incl    %ecx
        movl    44(%esp), %esi          # 4-byte Reload
        incl    %esi
        cmpl    $10, %ecx
        jne     .LBB0_5
# BB#12:                                #   in Loop: Header=BB0_4 Depth=4
        movl    36(%esp), %ecx          # 4-byte Reload
        incl    %ecx
        movl    40(%esp), %esi          # 4-byte Reload
        incl    %esi
        cmpl    $10, %ecx
        jne     .LBB0_4
# BB#13:                                #   in Loop: Header=BB0_3 Depth=3
        movl    32(%esp), %ecx          # 4-byte Reload
        incl    %ecx
        movl    28(%esp), %esi          # 4-byte Reload
        incl    %esi
        cmpl    $10, %ecx
        jne     .LBB0_3
# BB#14:                                #   in Loop: Header=BB0_2 Depth=2
        movl    20(%esp), %ecx          # 4-byte Reload
        incl    %ecx
        movl    24(%esp), %esi          # 4-byte Reload
        incl    %esi
        cmpl    $10, %ecx
        jne     .LBB0_2
# BB#15:                                #   in Loop: Header=BB0_1 Depth=1
        movl    16(%esp), %eax          # 4-byte Reload
        incl    %eax
        cmpl    $10, %eax
        jne     .LBB0_1
# BB#16:
        movl    %ebx, 4(%esp)
        movl    $.L.str, (%esp)
        calll   printf
        xorl    %eax, %eax
        addl    $60, %esp
        popl    %esi
        popl    %edi
        popl    %ebx
        popl    %ebp
        retl
.Lfunc_end0:
        .size   main, .Lfunc_end0-main

        .type   .L.str,@object          # @.str
        .section        .rodata.str1.1,"aMS",@progbits,1
.L.str:
        .asciz  "Found %i tickets."
        .size   .L.str, 18


        .ident  "clang version 3.8.1 (http://llvm.org/git/clang 
2cb088be9c6a3d1ef9a050d44e1b01393983fc4d) (http://llvm.org/git/llvm 
051e787f26dbfdc26cf61a57bc82ca00dcb812e8)"
        .section        ".note.GNU-stack","",@progbits
        .text
        .file   "benchmark_opt_mse.bc"
        .globl  main
        .align  16, 0x90
        .type   main,@function
main:                                   # @main
        .cfi_startproc
# BB#0:
        pushl   %ebp
.Ltmp0:
        .cfi_def_cfa_offset 8
        pushl   %ebx
.Ltmp1:
        .cfi_def_cfa_offset 12
        pushl   %edi
.Ltmp2:
        .cfi_def_cfa_offset 16
        pushl   %esi
.Ltmp3:
        .cfi_def_cfa_offset 20
        subl    $60, %esp
.Ltmp4:
        .cfi_def_cfa_offset 80
.Ltmp5:
        .cfi_offset %esi, -20
.Ltmp6:
        .cfi_offset %edi, -16
.Ltmp7:
        .cfi_offset %ebx, -12
.Ltmp8:
        .cfi_offset %ebp, -8
        movl    $-1, __unnamed_1
        movl    $-1, %eax
        .align  16, 0x90
.LBB0_1:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_2 Depth 2
                                        #       Child Loop BB0_3 Depth 3
                                        #         Child Loop BB0_4 Depth 4
                                        #           Child Loop BB0_5 Depth 5
                                        #             Child Loop BB0_6 Depth 6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %eax, 16(%esp)          # 4-byte Spill
        xorl    %esi, %esi
        movl    $-4, %eax
        movl    $-1, %ecx
        .align  16, 0x90
.LBB0_2:                                #   Parent Loop BB0_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_3 Depth 3
                                        #         Child Loop BB0_4 Depth 4
                                        #           Child Loop BB0_5 Depth 5
                                        #             Child Loop BB0_6 Depth 6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %eax, 24(%esp)          # 4-byte Spill
        incl    %ecx
        movl    %ecx, 20(%esp)          # 4-byte Spill
        movl    $-1, %ecx
        .align  16, 0x90
.LBB0_3:                                #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB0_4 Depth 4
                                        #           Child Loop BB0_5 Depth 5
                                        #             Child Loop BB0_6 Depth 6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %eax, 28(%esp)          # 4-byte Spill
        incl    %ecx
        movl    %ecx, 32(%esp)          # 4-byte Spill
        movl    $-1, %ecx
        .align  16, 0x90
.LBB0_4:                                #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        # =>      This Loop Header: Depth=4
                                        #           Child Loop BB0_5 Depth 5
                                        #             Child Loop BB0_6 Depth 6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %eax, 40(%esp)          # 4-byte Spill
        incl    %ecx
        movl    %ecx, 36(%esp)          # 4-byte Spill
        movl    $-1, %ecx
        .align  16, 0x90
.LBB0_5:                                #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        #         Parent Loop BB0_4 Depth=4
                                        # =>        This Loop Header: Depth=5
                                        #             Child Loop BB0_6 Depth 6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %eax, 44(%esp)          # 4-byte Spill
        incl    %ecx
        movl    %ecx, 48(%esp)          # 4-byte Spill
        movl    $-1, %ecx
        .align  16, 0x90
.LBB0_6:                                #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        #         Parent Loop BB0_4 Depth=4
                                        #           Parent Loop BB0_5 Depth=5
                                        # =>          This Loop Header: Depth=6
                                        #               Child Loop BB0_7 Depth 7
                                        #                 Child Loop BB0_8 
Depth 8
        movl    %eax, 56(%esp)          # 4-byte Spill
        incl    %ecx
        movl    %ecx, 52(%esp)          # 4-byte Spill
        movl    $-1, %edi
        movl    %eax, %ecx
        .align  16, 0x90
.LBB0_7:                                #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        #         Parent Loop BB0_4 Depth=4
                                        #           Parent Loop BB0_5 Depth=5
                                        #             Parent Loop BB0_6 Depth=6
                                        # =>            This Loop Header: 
Depth=7
                                        #                 Child Loop BB0_8 
Depth 8
        incl    %edi
        movl    $10, %edx
        movl    %ecx, %ebp
        .align  16, 0x90
.LBB0_8:                                #   Parent Loop BB0_1 Depth=1
                                        #     Parent Loop BB0_2 Depth=2
                                        #       Parent Loop BB0_3 Depth=3
                                        #         Parent Loop BB0_4 Depth=4
                                        #           Parent Loop BB0_5 Depth=5
                                        #             Parent Loop BB0_6 Depth=6
                                        #               Parent Loop BB0_7 
Depth=7
                                        # =>              This Inner Loop 
Header: Depth=8
        cmpl    $-4, %ebp
        sete    %bl
        movzbl  %bl, %ebx
        addl    %esi, %ebx
        cmpl    $-3, %ebp
        sete    %al
        movzbl  %al, %eax
        addl    %ebx, %eax
        cmpl    $-2, %ebp
        sete    %bl
        movzbl  %bl, %esi
        addl    %eax, %esi
        cmpl    $-1, %ebp
        sete    %al
        movzbl  %al, %eax
        addl    %esi, %eax
        testl   %ebp, %ebp
        sete    %bl
        movzbl  %bl, %esi
        addl    %eax, %esi
        cmpl    $1, %ebp
        sete    %al
        movzbl  %al, %eax
        addl    %esi, %eax
        cmpl    $2, %ebp
        sete    %bl
        movzbl  %bl, %esi
        addl    %eax, %esi
        cmpl    $3, %ebp
        sete    %al
        movzbl  %al, %eax
        addl    %esi, %eax
        cmpl    $4, %ebp
        sete    %bl
        movzbl  %bl, %ebx
        addl    %eax, %ebx
        cmpl    $5, %ebp
        sete    %al
        movzbl  %al, %esi
        addl    %ebx, %esi
        decl    %ebp
        decl    %edx
        jne     .LBB0_8
# BB#9:                                 #   in Loop: Header=BB0_7 Depth=7
        decl    %ecx
        cmpl    $9, %edi
        jne     .LBB0_7
# BB#10:                                #   in Loop: Header=BB0_6 Depth=6
        movl    56(%esp), %eax          # 4-byte Reload
        decl    %eax
        movl    52(%esp), %ecx          # 4-byte Reload
        cmpl    $9, %ecx
        jne     .LBB0_6
# BB#11:                                #   in Loop: Header=BB0_5 Depth=5
        movl    44(%esp), %eax          # 4-byte Reload
        incl    %eax
        movl    48(%esp), %ecx          # 4-byte Reload
        cmpl    $9, %ecx
        jne     .LBB0_5
# BB#12:                                #   in Loop: Header=BB0_4 Depth=4
        movl    40(%esp), %eax          # 4-byte Reload
        incl    %eax
        movl    36(%esp), %ecx          # 4-byte Reload
        cmpl    $9, %ecx
        jne     .LBB0_4
# BB#13:                                #   in Loop: Header=BB0_3 Depth=3
        movl    28(%esp), %eax          # 4-byte Reload
        incl    %eax
        movl    32(%esp), %ecx          # 4-byte Reload
        cmpl    $9, %ecx
        jne     .LBB0_3
# BB#14:                                #   in Loop: Header=BB0_2 Depth=2
        movl    24(%esp), %eax          # 4-byte Reload
        incl    %eax
        movl    20(%esp), %ecx          # 4-byte Reload
        cmpl    $9, %ecx
        jne     .LBB0_2
# BB#15:                                #   in Loop: Header=BB0_1 Depth=1
        movl    16(%esp), %eax          # 4-byte Reload
        incl    %eax
        cmpl    $9, %eax
        jne     .LBB0_1
# BB#16:
        movl    $9, __unnamed_2
        movl    $9, __unnamed_3
        movl    $9, __unnamed_4
        movl    $9, __unnamed_5
        movl    $9, __unnamed_6
        movl    $9, __unnamed_7
        movl    $9, __unnamed_8
        movl    $9, __unnamed_9
        movl    %esi, __unnamed_10
        movl    $9, __unnamed_1
        movl    $__unnamed_11+8, 4(%esp)
        movl    $__unnamed_12, (%esp)
        calll   printf
        movl    %esi, 4(%esp)
        movl    $__unnamed_13, (%esp)
        calll   printf
        movl    $__unnamed_11+24, 4(%esp)
        movl    $__unnamed_12, (%esp)
        calll   printf
        movl    $10, (%esp)
        calll   putchar
        movl    __mla__system.1, %eax
        addl    $60, %esp
        popl    %esi
        popl    %edi
        popl    %ebx
        popl    %ebp
        retl
.Lfunc_end0:
        .size   main, .Lfunc_end0-main
        .cfi_endproc

        .type   __mla__system.1,@object # @__mla__system.1
        .bss
        .globl  __mla__system.1
        .align  4
__mla__system.1:
        .long   0                       # 0x0
        .size   __mla__system.1, 4

        .type   __unnamed_3,@object     # @0
        .local  __unnamed_3
        .comm   __unnamed_3,4,4
        .type   __unnamed_4,@object     # @1
        .local  __unnamed_4
        .comm   __unnamed_4,4,4
        .type   __unnamed_5,@object     # @2
        .local  __unnamed_5
        .comm   __unnamed_5,4,4
        .type   __unnamed_6,@object     # @3
        .local  __unnamed_6
        .comm   __unnamed_6,4,4
        .type   __unnamed_7,@object     # @4
        .local  __unnamed_7
        .comm   __unnamed_7,4,4
        .type   __unnamed_8,@object     # @5
        .local  __unnamed_8
        .comm   __unnamed_8,4,4
        .type   __unnamed_9,@object     # @6
        .local  __unnamed_9
        .comm   __unnamed_9,4,4
        .type   __unnamed_2,@object     # @7
        .local  __unnamed_2
        .comm   __unnamed_2,4,4
        .type   __unnamed_10,@object    # @8
        .local  __unnamed_10
        .comm   __unnamed_10,4,4
        .type   __unnamed_1,@object     # @9
        .local  __unnamed_1
        .comm   __unnamed_1,4,4
        .type   __unnamed_11,@object    # @10
        .data
        .align  16
__unnamed_11:
        .asciz  "\377\377\377\377\006\000\000\000Found 
\000\000\377\377\377\377\t\000\000\000 tickets.\000\000"
        .size   __unnamed_11, 36

        .type   __unnamed_13,@object    # @11
        .section        .rodata,"a",@progbits
__unnamed_13:
        .asciz  "%d"
        .size   __unnamed_13, 3

        .type   __unnamed_12,@object    # @12
__unnamed_12:
        .asciz  "%s"
        .size   __unnamed_12, 3


        .section        ".note.GNU-stack","",@progbits
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to