void foo(unsigned int *__restrict__ pInput,
         unsigned int *__restrict__ pOutput) {
  unsigned int i, a, b, c, d;
  for (i = 0; i < 16 / 4; i++) {
    a = *pInput++;
    b = *pInput++;
    c = *pInput++;
    d = *pInput++;
    *pOutput++ = 100 * a + 1322 * b + 74 * c + 134 * d;
    *pOutput++ = 216 * a + 13 * b + 191 * c + 117 * d;
    *pOutput++ = 23 * a + 27271 * b + 500 * c + 11 * d;
    *pOutput++ = 237 * a + 2280 * b + 111 * c + 771 * d;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jae    1232 <foo+0x132>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
imul   $0x64,-0x18(%rbp),%ecx
imul   $0x52a,-0x1c(%rbp),%eax
add    %eax,%ecx
imul   $0x4a,-0x20(%rbp),%eax
add    %eax,%ecx
imul   $0x86,-0x24(%rbp),%eax
add    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
imul   $0xd8,-0x18(%rbp),%ecx
imul   $0xd,-0x1c(%rbp),%eax
add    %eax,%ecx
imul   $0xbf,-0x20(%rbp),%eax
add    %eax,%ecx
imul   $0x75,-0x24(%rbp),%eax
add    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
imul   $0x17,-0x18(%rbp),%ecx
imul   $0x6a87,-0x1c(%rbp),%eax
add    %eax,%ecx
imul   $0x1f4,-0x20(%rbp),%eax
add    %eax,%ecx
imul   $0xb,-0x24(%rbp),%eax
add    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
imul   $0xed,-0x18(%rbp),%ecx
imul   $0x8e8,-0x1c(%rbp),%eax
add    %eax,%ecx
imul   $0x6f,-0x20(%rbp),%eax
add    %eax,%ecx
imul   $0x303,-0x24(%rbp),%eax
add    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <foo+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movq   (%rdi),%xmm2
pshufd $0x44,%xmm2,%xmm4
pshufd $0x11,%xmm2,%xmm3
movdqa 0xeea(%rip),%xmm0
movdqa %xmm4,%xmm1
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm5
movdqa 0xee4(%rip),%xmm8
pmuludq %xmm8,%xmm3
pshufd $0xe8,%xmm3,%xmm6
punpckldq %xmm5,%xmm6
pshufd $0x55,%xmm2,%xmm3
movdqa 0xed8(%rip),%xmm9
pmuludq %xmm9,%xmm3
pshufd $0xe8,%xmm3,%xmm5
movdqa 0xed5(%rip),%xmm10
pmuludq %xmm10,%xmm4
pshufd $0xe8,%xmm4,%xmm1
punpckldq %xmm5,%xmm1
paddd  %xmm6,%xmm1
movd   0x8(%rdi),%xmm4
pshufd $0x0,%xmm4,%xmm6
movdqa 0xec1(%rip),%xmm4
movdqa %xmm6,%xmm5
pmuludq %xmm4,%xmm5
pshufd $0xe8,%xmm5,%xmm7
movdqa 0xebb(%rip),%xmm11
pmuludq %xmm11,%xmm6
pshufd $0xe8,%xmm6,%xmm2
punpckldq %xmm7,%xmm2
movd   0xc(%rdi),%xmm6
pshufd $0x0,%xmm6,%xmm3
movdqa 0xeab(%rip),%xmm6
movdqa %xmm3,%xmm7
pmuludq %xmm6,%xmm7
pshufd $0xe8,%xmm7,%xmm5
movdqa 0xea6(%rip),%xmm7
pmuludq %xmm7,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm5,%xmm3
paddd  %xmm2,%xmm3
paddd  %xmm1,%xmm3
movdqu %xmm3,(%rsi)
movq   0x10(%rdi),%xmm1
pshufd $0x44,%xmm1,%xmm2
pshufd $0x11,%xmm1,%xmm3
movdqa %xmm2,%xmm5
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm5
pmuludq %xmm8,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm5,%xmm3
pshufd $0x55,%xmm1,%xmm1
pmuludq %xmm9,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm10,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm1,%xmm2
paddd  %xmm3,%xmm2
movd   0x18(%rdi),%xmm1
pshufd $0x0,%xmm1,%xmm1
movdqa %xmm1,%xmm3
pmuludq %xmm4,%xmm3
pshufd $0xe8,%xmm3,%xmm3
pmuludq %xmm11,%xmm1
pshufd $0xe8,%xmm1,%xmm1
punpckldq %xmm3,%xmm1
movd   0x1c(%rdi),%xmm3
pshufd $0x0,%xmm3,%xmm3
movdqa %xmm3,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xe8,%xmm5,%xmm5
pmuludq %xmm7,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm5,%xmm3
paddd  %xmm1,%xmm3
paddd  %xmm2,%xmm3
movdqu %xmm3,0x10(%rsi)
movq   0x20(%rdi),%xmm1
pshufd $0x44,%xmm1,%xmm2
pshufd $0x11,%xmm1,%xmm3
movdqa %xmm2,%xmm5
pmuludq %xmm0,%xmm5
pshufd $0xe8,%xmm5,%xmm5
pmuludq %xmm8,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm5,%xmm3
pshufd $0x55,%xmm1,%xmm1
pmuludq %xmm9,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm10,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm1,%xmm2
paddd  %xmm3,%xmm2
movd   0x28(%rdi),%xmm1
pshufd $0x0,%xmm1,%xmm1
movdqa %xmm1,%xmm3
pmuludq %xmm4,%xmm3
pshufd $0xe8,%xmm3,%xmm3
pmuludq %xmm11,%xmm1
pshufd $0xe8,%xmm1,%xmm1
punpckldq %xmm3,%xmm1
movd   0x2c(%rdi),%xmm3
pshufd $0x0,%xmm3,%xmm3
movdqa %xmm3,%xmm5
pmuludq %xmm6,%xmm5
pshufd $0xe8,%xmm5,%xmm5
pmuludq %xmm7,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm5,%xmm3
paddd  %xmm1,%xmm3
paddd  %xmm2,%xmm3
movdqu %xmm3,0x20(%rsi)
movq   0x30(%rdi),%xmm1
pshufd $0x44,%xmm1,%xmm2
pshufd $0x11,%xmm1,%xmm3
pmuludq %xmm2,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pmuludq %xmm8,%xmm3
pshufd $0xe8,%xmm3,%xmm3
punpckldq %xmm0,%xmm3
pshufd $0x55,%xmm1,%xmm0
pmuludq %xmm9,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pmuludq %xmm10,%xmm2
pshufd $0xe8,%xmm2,%xmm1
punpckldq %xmm0,%xmm1
paddd  %xmm3,%xmm1
movd   0x38(%rdi),%xmm0
pshufd $0x0,%xmm0,%xmm0
pmuludq %xmm0,%xmm4
pshufd $0xe8,%xmm4,%xmm2
pmuludq %xmm11,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm2,%xmm0
movd   0x3c(%rdi),%xmm2
pshufd $0x0,%xmm2,%xmm2
pmuludq %xmm2,%xmm6
pshufd $0xe8,%xmm6,%xmm3
pmuludq %xmm7,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm3,%xmm2
paddd  %xmm0,%xmm2
paddd  %xmm1,%xmm2
movdqu %xmm2,0x30(%rsi)
ret

LLVM IR (-O0):
define void @foo(i32* noalias %0, i32* noalias %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %10
10: ; preds = %78, %2
%11 = load i32, i32* %5
%12 = icmp ult i32 %11, 4
br i1 %12, label %13, label %81
13: ; preds = %10
%14 = load i32*, i32** %3
%15 = getelementptr inbounds i32, i32* %14, i32 1
store i32* %15, i32** %3
%16 = load i32, i32* %14
store i32 %16, i32* %6
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i32 1
store i32* %18, i32** %3
%19 = load i32, i32* %17
store i32 %19, i32* %7
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i32 1
store i32* %21, i32** %3
%22 = load i32, i32* %20
store i32 %22, i32* %8
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i32, i32* %23, i32 1
store i32* %24, i32** %3
%25 = load i32, i32* %23
store i32 %25, i32* %9
%26 = load i32, i32* %6
%27 = mul i32 100, %26
%28 = load i32, i32* %7
%29 = mul i32 1322, %28
%30 = add i32 %27, %29
%31 = load i32, i32* %8
%32 = mul i32 74, %31
%33 = add i32 %30, %32
%34 = load i32, i32* %9
%35 = mul i32 134, %34
%36 = add i32 %33, %35
%37 = load i32*, i32** %4
%38 = getelementptr inbounds i32, i32* %37, i32 1
store i32* %38, i32** %4
store i32 %36, i32* %37
%39 = load i32, i32* %6
%40 = mul i32 216, %39
%41 = load i32, i32* %7
%42 = mul i32 13, %41
%43 = add i32 %40, %42
%44 = load i32, i32* %8
%45 = mul i32 191, %44
%46 = add i32 %43, %45
%47 = load i32, i32* %9
%48 = mul i32 117, %47
%49 = add i32 %46, %48
%50 = load i32*, i32** %4
%51 = getelementptr inbounds i32, i32* %50, i32 1
store i32* %51, i32** %4
store i32 %49, i32* %50
%52 = load i32, i32* %6
%53 = mul i32 23, %52
%54 = load i32, i32* %7
%55 = mul i32 27271, %54
%56 = add i32 %53, %55
%57 = load i32, i32* %8
%58 = mul i32 500, %57
%59 = add i32 %56, %58
%60 = load i32, i32* %9
%61 = mul i32 11, %60
%62 = add i32 %59, %61
%63 = load i32*, i32** %4
%64 = getelementptr inbounds i32, i32* %63, i32 1
store i32* %64, i32** %4
store i32 %62, i32* %63
%65 = load i32, i32* %6
%66 = mul i32 237, %65
%67 = load i32, i32* %7
%68 = mul i32 2280, %67
%69 = add i32 %66, %68
%70 = load i32, i32* %8
%71 = mul i32 111, %70
%72 = add i32 %69, %71
%73 = load i32, i32* %9
%74 = mul i32 771, %73
%75 = add i32 %72, %74
%76 = load i32*, i32** %4
%77 = getelementptr inbounds i32, i32* %76, i32 1
store i32* %77, i32** %4
store i32 %75, i32* %76
br label %78
78: ; preds = %13
%79 = load i32, i32* %5
%80 = add i32 %79, 1
store i32 %80, i32* %5
br label %10
81: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @foo(i32* noalias nocapture %0, i32* noalias nocapture writeonly %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 2
%4 = bitcast i32* %0 to <2 x i32>*
%5 = load <2 x i32>, <2 x i32>* %4
%6 = shufflevector <2 x i32> %5, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%7 = getelementptr inbounds i32, i32* %0, i64 3
%8 = load i32, i32* %3
%9 = getelementptr inbounds i32, i32* %0, i64 4
%10 = load i32, i32* %7
%11 = shufflevector <2 x i32> %5, <2 x i32> undef, <4 x i32> <i32 1, i32 0, i32 undef, i32 undef>
%12 = shufflevector <4 x i32> %11, <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%13 = mul <4 x i32> %12, <i32 1322, i32 216, i32 27271, i32 237>
%14 = mul <4 x i32> %6, <i32 100, i32 13, i32 23, i32 2280>
%15 = add <4 x i32> %14, %13
%16 = insertelement <4 x i32> poison, i32 %8, i64 0
%17 = shufflevector <4 x i32> %16, <4 x i32> poison, <4 x i32> zeroinitializer
%18 = mul <4 x i32> %17, <i32 74, i32 191, i32 500, i32 111>
%19 = add <4 x i32> %15, %18
%20 = insertelement <4 x i32> poison, i32 %10, i64 0
%21 = shufflevector <4 x i32> %20, <4 x i32> poison, <4 x i32> zeroinitializer
%22 = mul <4 x i32> %21, <i32 134, i32 117, i32 11, i32 771>
%23 = add <4 x i32> %19, %22
%24 = getelementptr inbounds i32, i32* %1, i64 4
%25 = bitcast i32* %1 to <4 x i32>*
store <4 x i32> %23, <4 x i32>* %25
%26 = getelementptr inbounds i32, i32* %0, i64 6
%27 = bitcast i32* %9 to <2 x i32>*
%28 = load <2 x i32>, <2 x i32>* %27
%29 = shufflevector <2 x i32> %28, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%30 = getelementptr inbounds i32, i32* %0, i64 7
%31 = load i32, i32* %26
%32 = getelementptr inbounds i32, i32* %0, i64 8
%33 = load i32, i32* %30
%34 = shufflevector <2 x i32> %28, <2 x i32> undef, <4 x i32> <i32 1, i32 0, i32 undef, i32 undef>
%35 = shufflevector <4 x i32> %34, <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%36 = mul <4 x i32> %35, <i32 1322, i32 216, i32 27271, i32 237>
%37 = mul <4 x i32> %29, <i32 100, i32 13, i32 23, i32 2280>
%38 = add <4 x i32> %37, %36
%39 = insertelement <4 x i32> poison, i32 %31, i64 0
%40 = shufflevector <4 x i32> %39, <4 x i32> poison, <4 x i32> zeroinitializer
%41 = mul <4 x i32> %40, <i32 74, i32 191, i32 500, i32 111>
%42 = add <4 x i32> %38, %41
%43 = insertelement <4 x i32> poison, i32 %33, i64 0
%44 = shufflevector <4 x i32> %43, <4 x i32> poison, <4 x i32> zeroinitializer
%45 = mul <4 x i32> %44, <i32 134, i32 117, i32 11, i32 771>
%46 = add <4 x i32> %42, %45
%47 = getelementptr inbounds i32, i32* %1, i64 8
%48 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> %46, <4 x i32>* %48
%49 = getelementptr inbounds i32, i32* %0, i64 10
%50 = bitcast i32* %32 to <2 x i32>*
%51 = load <2 x i32>, <2 x i32>* %50
%52 = shufflevector <2 x i32> %51, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%53 = getelementptr inbounds i32, i32* %0, i64 11
%54 = load i32, i32* %49
%55 = getelementptr inbounds i32, i32* %0, i64 12
%56 = load i32, i32* %53
%57 = shufflevector <2 x i32> %51, <2 x i32> undef, <4 x i32> <i32 1, i32 0, i32 undef, i32 undef>
%58 = shufflevector <4 x i32> %57, <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%59 = mul <4 x i32> %58, <i32 1322, i32 216, i32 27271, i32 237>
%60 = mul <4 x i32> %52, <i32 100, i32 13, i32 23, i32 2280>
%61 = add <4 x i32> %60, %59
%62 = insertelement <4 x i32> poison, i32 %54, i64 0
%63 = shufflevector <4 x i32> %62, <4 x i32> poison, <4 x i32> zeroinitializer
%64 = mul <4 x i32> %63, <i32 74, i32 191, i32 500, i32 111>
%65 = add <4 x i32> %61, %64
%66 = insertelement <4 x i32> poison, i32 %56, i64 0
%67 = shufflevector <4 x i32> %66, <4 x i32> poison, <4 x i32> zeroinitializer
%68 = mul <4 x i32> %67, <i32 134, i32 117, i32 11, i32 771>
%69 = add <4 x i32> %65, %68
%70 = getelementptr inbounds i32, i32* %1, i64 12
%71 = bitcast i32* %47 to <4 x i32>*
store <4 x i32> %69, <4 x i32>* %71
%72 = getelementptr inbounds i32, i32* %0, i64 14
%73 = bitcast i32* %55 to <2 x i32>*
%74 = load <2 x i32>, <2 x i32>* %73
%75 = shufflevector <2 x i32> %74, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%76 = getelementptr inbounds i32, i32* %0, i64 15
%77 = load i32, i32* %72
%78 = load i32, i32* %76
%79 = shufflevector <2 x i32> %74, <2 x i32> undef, <4 x i32> <i32 1, i32 0, i32 undef, i32 undef>
%80 = shufflevector <4 x i32> %79, <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%81 = mul <4 x i32> %80, <i32 1322, i32 216, i32 27271, i32 237>
%82 = mul <4 x i32> %75, <i32 100, i32 13, i32 23, i32 2280>
%83 = add <4 x i32> %82, %81
%84 = insertelement <4 x i32> poison, i32 %77, i64 0
%85 = shufflevector <4 x i32> %84, <4 x i32> poison, <4 x i32> zeroinitializer
%86 = mul <4 x i32> %85, <i32 74, i32 191, i32 500, i32 111>
%87 = add <4 x i32> %83, %86
%88 = insertelement <4 x i32> poison, i32 %78, i64 0
%89 = shufflevector <4 x i32> %88, <4 x i32> poison, <4 x i32> zeroinitializer
%90 = mul <4 x i32> %89, <i32 134, i32 117, i32 11, i32 771>
%91 = add <4 x i32> %87, %90
%92 = bitcast i32* %70 to <4 x i32>*
store <4 x i32> %91, <4 x i32>* %92
ret void
}