1 ; RUN: opt -S < %s -passes=loop-idiom | FileCheck %s
3 declare void @llvm.sideeffect()
5 ; Loop idiom recognition across a @llvm.sideeffect.
9 define void @zero(ptr %p, i64 %n) nounwind {
14 %i.02 = phi i64 [ 0, %bb7.lr.ph ], [ %tmp13, %bb7 ]
15 %tmp10 = getelementptr inbounds float, ptr %p, i64 %i.02
16 store float 0.000000e+00, ptr %tmp10, align 4
17 %tmp13 = add i64 %i.02, 1
18 %tmp6 = icmp ult i64 %tmp13, %n
19 br i1 %tmp6, label %bb7, label %bb14