void test_float(float *data) {
#pragma omp simd
  for (int i = 0; i < 256 / sizeof(float); ++i)
    data[i] = 2.0f;
}


x86 assembly (clang, -O0):
<test_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x40,%rax
jae    1140 <test_float+0x40>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  0xed3(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <test_float+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_float>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x70(%rdi)
movups %xmm0,0x80(%rdi)
movups %xmm0,0x90(%rdi)
movups %xmm0,0xa0(%rdi)
movups %xmm0,0xb0(%rdi)
movups %xmm0,0xc0(%rdi)
movups %xmm0,0xd0(%rdi)
movups %xmm0,0xe0(%rdi)
movups %xmm0,0xf0(%rdi)
ret

LLVM IR (-O0):
define void @test_float(float* %0) {
%2 = alloca float*
%3 = alloca i32
store float* %0, float** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = icmp ult i64 %6, 64
br i1 %7, label %8, label %16
8: ; preds = %4
%9 = load float*, float** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds float, float* %9, i64 %11
store float 2.000000e+00, float* %12
br label %13
13: ; preds = %8
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @test_float(float* nocapture writeonly %0) {
%2 = bitcast float* %0 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %2
%3 = getelementptr inbounds float, float* %0, i64 4
%4 = bitcast float* %3 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %4
%5 = getelementptr inbounds float, float* %0, i64 8
%6 = bitcast float* %5 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %6
%7 = getelementptr inbounds float, float* %0, i64 12
%8 = bitcast float* %7 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %8
%9 = getelementptr inbounds float, float* %0, i64 16
%10 = bitcast float* %9 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %10
%11 = getelementptr inbounds float, float* %0, i64 20
%12 = bitcast float* %11 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %12
%13 = getelementptr inbounds float, float* %0, i64 24
%14 = bitcast float* %13 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %14
%15 = getelementptr inbounds float, float* %0, i64 28
%16 = bitcast float* %15 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %16
%17 = getelementptr inbounds float, float* %0, i64 32
%18 = bitcast float* %17 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %18
%19 = getelementptr inbounds float, float* %0, i64 36
%20 = bitcast float* %19 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %20
%21 = getelementptr inbounds float, float* %0, i64 40
%22 = bitcast float* %21 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %22
%23 = getelementptr inbounds float, float* %0, i64 44
%24 = bitcast float* %23 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %24
%25 = getelementptr inbounds float, float* %0, i64 48
%26 = bitcast float* %25 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %26
%27 = getelementptr inbounds float, float* %0, i64 52
%28 = bitcast float* %27 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %28
%29 = getelementptr inbounds float, float* %0, i64 56
%30 = bitcast float* %29 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %30
%31 = getelementptr inbounds float, float* %0, i64 60
%32 = bitcast float* %31 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %32
ret void
}