void foo(int *a, int *b, int *c) {
  int i;
#pragma simd vl(4)
  for (i = 0; i < 64; i++)
    a[i] = b[i] * c[i];
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x40,-0x1c(%rbp)
jge    1151 <foo+0x51>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <foo+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0x100(%rsi),%rax
cmp    %rdi,%rax
seta   %r9b
lea    0x100(%rdi),%rcx
cmp    %rsi,%rcx
seta   %r10b
lea    0x100(%rdx),%rax
cmp    %rdi,%rax
seta   %al
cmp    %rdx,%rcx
seta   %r8b
test   %r10b,%r9b
jne    1478 <foo+0x378>
and    %r8b,%al
jne    1478 <foo+0x378>
movdqu (%rsi),%xmm0
movdqu (%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,(%rdi)
movdqu 0x10(%rsi),%xmm0
movdqu 0x10(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0x10(%rdi)
movdqu 0x20(%rsi),%xmm0
movdqu 0x20(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0x20(%rdi)
movdqu 0x30(%rsi),%xmm0
movdqu 0x30(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0x30(%rdi)
movdqu 0x40(%rsi),%xmm0
movdqu 0x40(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0x40(%rdi)
movdqu 0x50(%rsi),%xmm0
movdqu 0x50(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0x50(%rdi)
movdqu 0x60(%rsi),%xmm0
movdqu 0x60(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0x60(%rdi)
movdqu 0x70(%rsi),%xmm0
movdqu 0x70(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0x70(%rdi)
movdqu 0x80(%rsi),%xmm0
movdqu 0x80(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0x80(%rdi)
movdqu 0x90(%rsi),%xmm0
movdqu 0x90(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0x90(%rdi)
movdqu 0xa0(%rsi),%xmm0
movdqu 0xa0(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0xa0(%rdi)
movdqu 0xb0(%rsi),%xmm0
movdqu 0xb0(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0xb0(%rdi)
movdqu 0xc0(%rsi),%xmm0
movdqu 0xc0(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0xc0(%rdi)
movdqu 0xd0(%rsi),%xmm0
movdqu 0xd0(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0xd0(%rdi)
movdqu 0xe0(%rsi),%xmm0
movdqu 0xe0(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0xe0(%rdi)
movdqu 0xf0(%rsi),%xmm0
movdqu 0xf0(%rdx),%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm0
punpckldq %xmm0,%xmm1
movdqu %xmm1,0xf0(%rdi)
ret
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    (%rdx,%rax,4),%ecx
imul   (%rsi,%rax,4),%ecx
mov    %ecx,(%rdi,%rax,4)
mov    0x4(%rdx,%rax,4),%ecx
imul   0x4(%rsi,%rax,4),%ecx
mov    %ecx,0x4(%rdi,%rax,4)
mov    0x8(%rdx,%rax,4),%ecx
imul   0x8(%rsi,%rax,4),%ecx
mov    %ecx,0x8(%rdi,%rax,4)
mov    0xc(%rdx,%rax,4),%ecx
imul   0xc(%rsi,%rax,4),%ecx
mov    %ecx,0xc(%rdi,%rax,4)
add    $0x4,%rax
cmp    $0x40,%rax
jne    1480 <foo+0x380>
ret

LLVM IR (-O0):
define void @foo(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
store i32 0, i32* %7
br label %8
8: ; preds = %27, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 64
br i1 %10, label %11, label %30
11: ; preds = %8
%12 = load i32*, i32** %5
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = load i32*, i32** %6
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = mul nsw i32 %16, %21
%23 = load i32*, i32** %4
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
br label %27
27: ; preds = %11
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
br label %8
30: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @foo(i32* nocapture writeonly %0, i32* nocapture %1, i32* nocapture %2) {
%4 = getelementptr i32, i32* %0, i64 64
%5 = getelementptr i32, i32* %1, i64 64
%6 = getelementptr i32, i32* %2, i64 64
%7 = icmp ugt i32* %5, %0
%8 = icmp ugt i32* %4, %1
%9 = and i1 %7, %8
%10 = icmp ugt i32* %6, %0
%11 = icmp ugt i32* %4, %2
%12 = and i1 %10, %11
%13 = or i1 %9, %12
br i1 %13, label %156, label %14
14: ; preds = %3
%15 = bitcast i32* %1 to <4 x i32>*
%16 = load <4 x i32>, <4 x i32>* %15
%17 = bitcast i32* %2 to <4 x i32>*
%18 = load <4 x i32>, <4 x i32>* %17
%19 = mul nsw <4 x i32> %18, %16
%20 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %19, <4 x i32>* %20
%21 = getelementptr inbounds i32, i32* %1, i64 4
%22 = bitcast i32* %21 to <4 x i32>*
%23 = load <4 x i32>, <4 x i32>* %22
%24 = getelementptr inbounds i32, i32* %2, i64 4
%25 = bitcast i32* %24 to <4 x i32>*
%26 = load <4 x i32>, <4 x i32>* %25
%27 = mul nsw <4 x i32> %26, %23
%28 = getelementptr inbounds i32, i32* %0, i64 4
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> %27, <4 x i32>* %29
%30 = getelementptr inbounds i32, i32* %1, i64 8
%31 = bitcast i32* %30 to <4 x i32>*
%32 = load <4 x i32>, <4 x i32>* %31
%33 = getelementptr inbounds i32, i32* %2, i64 8
%34 = bitcast i32* %33 to <4 x i32>*
%35 = load <4 x i32>, <4 x i32>* %34
%36 = mul nsw <4 x i32> %35, %32
%37 = getelementptr inbounds i32, i32* %0, i64 8
%38 = bitcast i32* %37 to <4 x i32>*
store <4 x i32> %36, <4 x i32>* %38
%39 = getelementptr inbounds i32, i32* %1, i64 12
%40 = bitcast i32* %39 to <4 x i32>*
%41 = load <4 x i32>, <4 x i32>* %40
%42 = getelementptr inbounds i32, i32* %2, i64 12
%43 = bitcast i32* %42 to <4 x i32>*
%44 = load <4 x i32>, <4 x i32>* %43
%45 = mul nsw <4 x i32> %44, %41
%46 = getelementptr inbounds i32, i32* %0, i64 12
%47 = bitcast i32* %46 to <4 x i32>*
store <4 x i32> %45, <4 x i32>* %47
%48 = getelementptr inbounds i32, i32* %1, i64 16
%49 = bitcast i32* %48 to <4 x i32>*
%50 = load <4 x i32>, <4 x i32>* %49
%51 = getelementptr inbounds i32, i32* %2, i64 16
%52 = bitcast i32* %51 to <4 x i32>*
%53 = load <4 x i32>, <4 x i32>* %52
%54 = mul nsw <4 x i32> %53, %50
%55 = getelementptr inbounds i32, i32* %0, i64 16
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> %54, <4 x i32>* %56
%57 = getelementptr inbounds i32, i32* %1, i64 20
%58 = bitcast i32* %57 to <4 x i32>*
%59 = load <4 x i32>, <4 x i32>* %58
%60 = getelementptr inbounds i32, i32* %2, i64 20
%61 = bitcast i32* %60 to <4 x i32>*
%62 = load <4 x i32>, <4 x i32>* %61
%63 = mul nsw <4 x i32> %62, %59
%64 = getelementptr inbounds i32, i32* %0, i64 20
%65 = bitcast i32* %64 to <4 x i32>*
store <4 x i32> %63, <4 x i32>* %65
%66 = getelementptr inbounds i32, i32* %1, i64 24
%67 = bitcast i32* %66 to <4 x i32>*
%68 = load <4 x i32>, <4 x i32>* %67
%69 = getelementptr inbounds i32, i32* %2, i64 24
%70 = bitcast i32* %69 to <4 x i32>*
%71 = load <4 x i32>, <4 x i32>* %70
%72 = mul nsw <4 x i32> %71, %68
%73 = getelementptr inbounds i32, i32* %0, i64 24
%74 = bitcast i32* %73 to <4 x i32>*
store <4 x i32> %72, <4 x i32>* %74
%75 = getelementptr inbounds i32, i32* %1, i64 28
%76 = bitcast i32* %75 to <4 x i32>*
%77 = load <4 x i32>, <4 x i32>* %76
%78 = getelementptr inbounds i32, i32* %2, i64 28
%79 = bitcast i32* %78 to <4 x i32>*
%80 = load <4 x i32>, <4 x i32>* %79
%81 = mul nsw <4 x i32> %80, %77
%82 = getelementptr inbounds i32, i32* %0, i64 28
%83 = bitcast i32* %82 to <4 x i32>*
store <4 x i32> %81, <4 x i32>* %83
%84 = getelementptr inbounds i32, i32* %1, i64 32
%85 = bitcast i32* %84 to <4 x i32>*
%86 = load <4 x i32>, <4 x i32>* %85
%87 = getelementptr inbounds i32, i32* %2, i64 32
%88 = bitcast i32* %87 to <4 x i32>*
%89 = load <4 x i32>, <4 x i32>* %88
%90 = mul nsw <4 x i32> %89, %86
%91 = getelementptr inbounds i32, i32* %0, i64 32
%92 = bitcast i32* %91 to <4 x i32>*
store <4 x i32> %90, <4 x i32>* %92
%93 = getelementptr inbounds i32, i32* %1, i64 36
%94 = bitcast i32* %93 to <4 x i32>*
%95 = load <4 x i32>, <4 x i32>* %94
%96 = getelementptr inbounds i32, i32* %2, i64 36
%97 = bitcast i32* %96 to <4 x i32>*
%98 = load <4 x i32>, <4 x i32>* %97
%99 = mul nsw <4 x i32> %98, %95
%100 = getelementptr inbounds i32, i32* %0, i64 36
%101 = bitcast i32* %100 to <4 x i32>*
store <4 x i32> %99, <4 x i32>* %101
%102 = getelementptr inbounds i32, i32* %1, i64 40
%103 = bitcast i32* %102 to <4 x i32>*
%104 = load <4 x i32>, <4 x i32>* %103
%105 = getelementptr inbounds i32, i32* %2, i64 40
%106 = bitcast i32* %105 to <4 x i32>*
%107 = load <4 x i32>, <4 x i32>* %106
%108 = mul nsw <4 x i32> %107, %104
%109 = getelementptr inbounds i32, i32* %0, i64 40
%110 = bitcast i32* %109 to <4 x i32>*
store <4 x i32> %108, <4 x i32>* %110
%111 = getelementptr inbounds i32, i32* %1, i64 44
%112 = bitcast i32* %111 to <4 x i32>*
%113 = load <4 x i32>, <4 x i32>* %112
%114 = getelementptr inbounds i32, i32* %2, i64 44
%115 = bitcast i32* %114 to <4 x i32>*
%116 = load <4 x i32>, <4 x i32>* %115
%117 = mul nsw <4 x i32> %116, %113
%118 = getelementptr inbounds i32, i32* %0, i64 44
%119 = bitcast i32* %118 to <4 x i32>*
store <4 x i32> %117, <4 x i32>* %119
%120 = getelementptr inbounds i32, i32* %1, i64 48
%121 = bitcast i32* %120 to <4 x i32>*
%122 = load <4 x i32>, <4 x i32>* %121
%123 = getelementptr inbounds i32, i32* %2, i64 48
%124 = bitcast i32* %123 to <4 x i32>*
%125 = load <4 x i32>, <4 x i32>* %124
%126 = mul nsw <4 x i32> %125, %122
%127 = getelementptr inbounds i32, i32* %0, i64 48
%128 = bitcast i32* %127 to <4 x i32>*
store <4 x i32> %126, <4 x i32>* %128
%129 = getelementptr inbounds i32, i32* %1, i64 52
%130 = bitcast i32* %129 to <4 x i32>*
%131 = load <4 x i32>, <4 x i32>* %130
%132 = getelementptr inbounds i32, i32* %2, i64 52
%133 = bitcast i32* %132 to <4 x i32>*
%134 = load <4 x i32>, <4 x i32>* %133
%135 = mul nsw <4 x i32> %134, %131
%136 = getelementptr inbounds i32, i32* %0, i64 52
%137 = bitcast i32* %136 to <4 x i32>*
store <4 x i32> %135, <4 x i32>* %137
%138 = getelementptr inbounds i32, i32* %1, i64 56
%139 = bitcast i32* %138 to <4 x i32>*
%140 = load <4 x i32>, <4 x i32>* %139
%141 = getelementptr inbounds i32, i32* %2, i64 56
%142 = bitcast i32* %141 to <4 x i32>*
%143 = load <4 x i32>, <4 x i32>* %142
%144 = mul nsw <4 x i32> %143, %140
%145 = getelementptr inbounds i32, i32* %0, i64 56
%146 = bitcast i32* %145 to <4 x i32>*
store <4 x i32> %144, <4 x i32>* %146
%147 = getelementptr inbounds i32, i32* %1, i64 60
%148 = bitcast i32* %147 to <4 x i32>*
%149 = load <4 x i32>, <4 x i32>* %148
%150 = getelementptr inbounds i32, i32* %2, i64 60
%151 = bitcast i32* %150 to <4 x i32>*
%152 = load <4 x i32>, <4 x i32>* %151
%153 = mul nsw <4 x i32> %152, %149
%154 = getelementptr inbounds i32, i32* %0, i64 60
%155 = bitcast i32* %154 to <4 x i32>*
store <4 x i32> %153, <4 x i32>* %155
br label %187
156: ; preds = %3, %156
%157 = phi i64 [ %185, %156 ], [ 0, %3 ]
%158 = getelementptr inbounds i32, i32* %1, i64 %157
%159 = load i32, i32* %158
%160 = getelementptr inbounds i32, i32* %2, i64 %157
%161 = load i32, i32* %160
%162 = mul nsw i32 %161, %159
%163 = getelementptr inbounds i32, i32* %0, i64 %157
store i32 %162, i32* %163
%164 = or i64 %157, 1
%165 = getelementptr inbounds i32, i32* %1, i64 %164
%166 = load i32, i32* %165
%167 = getelementptr inbounds i32, i32* %2, i64 %164
%168 = load i32, i32* %167
%169 = mul nsw i32 %168, %166
%170 = getelementptr inbounds i32, i32* %0, i64 %164
store i32 %169, i32* %170
%171 = or i64 %157, 2
%172 = getelementptr inbounds i32, i32* %1, i64 %171
%173 = load i32, i32* %172
%174 = getelementptr inbounds i32, i32* %2, i64 %171
%175 = load i32, i32* %174
%176 = mul nsw i32 %175, %173
%177 = getelementptr inbounds i32, i32* %0, i64 %171
store i32 %176, i32* %177
%178 = or i64 %157, 3
%179 = getelementptr inbounds i32, i32* %1, i64 %178
%180 = load i32, i32* %179
%181 = getelementptr inbounds i32, i32* %2, i64 %178
%182 = load i32, i32* %181
%183 = mul nsw i32 %182, %180
%184 = getelementptr inbounds i32, i32* %0, i64 %178
store i32 %183, i32* %184
%185 = add nuw nsw i64 %157, 4
%186 = icmp eq i64 %185, 64
br i1 %186, label %187, label %156
187: ; preds = %156, %14
ret void
}