define void @foo(i32* nocapture readonly %h, i16* nocapture %y) {
entry:
  %h.11 = load i32, i32* %h, align 1
  br label %inner.cond.preheader

inner.cond.preheader:                             ; preds = %entry, %inner.end
  %i.07 = phi i16 [ 0, %entry ], [ %i.1, %inner.end ]
  %yp.06 = phi i16* [ %y, %entry ], [ %yp.2, %inner.end ]
  br label %inner.body

inner.body:                                       ; preds = %inner.cond.preheader, %inner.body
  %h.15 = phi i32 [ %h.11, %inner.cond.preheader ], [ %h.1, %inner.body ]
  %h.pn4 = phi i32* [ %h, %inner.cond.preheader ], [ %hp.1, %inner.body ]
  %j.03 = phi i16 [ 0, %inner.cond.preheader ], [ %j.1, %inner.body ]
  %real.02 = phi i32 [ 0, %inner.cond.preheader ], [ %sub, %inner.body ]
  %hp.1 = getelementptr inbounds i32, i32* %h.pn4, i64 1
; The loop can get vectorized if the load is placed here...
;  %h.1 = load i32, i32* %hp.1, align 1
  %0 = shl i32 %h.15, 16
  %conv7 = ashr exact i32 %0, 16
  %add = sub i32 %real.02, %h.15
  %sub = add i32 %add, %conv7
  %j.1 = add nuw nsw i16 %j.03, 1
; ... but not when it's here.
  %h.1 = load i32, i32* %hp.1, align 1
  %cmp3 = icmp ult i16 %j.03, 99
  br i1 %cmp3, label %inner.body, label %inner.end

inner.end:                                        ; preds = %inner.body
  %sub.lcssa = phi i32 [ %sub, %inner.body ]
  %conv27 = trunc i32 %sub.lcssa to i16
  store i16 %conv27, i16* %yp.06, align 1
  %yp.1 = getelementptr inbounds i16, i16* %yp.06, i64 1
  store i16 0, i16* %yp.1, align 1
  %yp.2 = getelementptr inbounds i16, i16* %yp.06, i64 2
  %i.1 = add nuw nsw i16 %i.07, 1
  %cmp = icmp ult i16 %i.07, 99
  br i1 %cmp, label %inner.cond.preheader, label %outer.end

outer.end:                                        ; preds = %inner.end
  ret void
}
