void dmat_yinvx(const int n, const double *x, double *y) {
  const double *xi;
  double *yi;
  xi = x + n - 1;
  yi = y + n - 1;
  do {
    *yi-- = 1 / (*xi--);
  } while (xi >= x);
}


x86 assembly (clang, -O0):
<dmat_yinvx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffff8,%rcx
mov    %rcx,-0x20(%rbp)
movsd  0xeac(%rip),%xmm0
divsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffff8,%rcx
mov    %rcx,-0x28(%rbp)
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    113d <dmat_yinvx+0x3d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmat_yinvx>:
movslq %edi,%rcx
lea    (%rsi,%rcx,8),%rax
add    $0xfffffffffffffff8,%rax
lea    (%rdx,%rcx,8),%rcx
add    $0xfffffffffffffff8,%rcx
movsd  0xee5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movapd %xmm0,%xmm1
divsd  (%rax),%xmm1
add    $0xfffffffffffffff8,%rax
movsd  %xmm1,(%rcx)
add    $0xfffffffffffffff8,%rcx
cmp    %rsi,%rax
jae    1120 <dmat_yinvx+0x20>
ret

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

LLVM IR (-O2):
define void @dmat_yinvx(i32 %0, double* %1, double* nocapture writeonly %2) {
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds double, double* %1, i64 %4
%6 = getelementptr inbounds double, double* %5, i64 -1
%7 = getelementptr inbounds double, double* %2, i64 %4
br label %8
8: ; preds = %8, %3
%9 = phi double* [ %6, %3 ], [ %12, %8 ]
%10 = phi double* [ %7, %3 ], [ %11, %8 ]
%11 = getelementptr inbounds double, double* %10, i64 -1
%12 = getelementptr inbounds double, double* %9, i64 -1
%13 = load double, double* %9
%14 = fdiv double 1.000000e+00, %13
store double %14, double* %11
%15 = icmp ult double* %12, %1
br i1 %15, label %16, label %8
16: ; preds = %8
ret void
}