xref: /minix3/external/bsd/llvm/dist/llvm/test/CodeGen/X86/2011-02-23-UnfoldBug.ll (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc; RUN: llc < %s -mtriple=x86_64-apple-darwin10
2*f4a2713aSLionel Sambuc; rdar://9045024
3*f4a2713aSLionel Sambuc; PR9305
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambucdefine void @calc_gb_rad_still_sse2_double() nounwind ssp {
6*f4a2713aSLionel Sambucentry:
7*f4a2713aSLionel Sambuc  br label %for.cond.outer
8*f4a2713aSLionel Sambuc
9*f4a2713aSLionel Sambucfor.cond.outer:                                   ; preds = %if.end71, %entry
10*f4a2713aSLionel Sambuc  %theta.0.ph = phi <2 x double> [ undef, %entry ], [ %theta.1, %if.end71 ]
11*f4a2713aSLionel Sambuc  %mul.i97 = fmul <2 x double> %theta.0.ph, undef
12*f4a2713aSLionel Sambuc  %mul.i96 = fmul <2 x double> %mul.i97, fmul (<2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> undef)
13*f4a2713aSLionel Sambuc  br i1 undef, label %for.body, label %for.end82
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambucfor.body:                                         ; preds = %for.cond.outer
16*f4a2713aSLionel Sambuc  br i1 undef, label %for.body33.lr.ph, label %for.end
17*f4a2713aSLionel Sambuc
18*f4a2713aSLionel Sambucfor.body33.lr.ph:                                 ; preds = %for.body
19*f4a2713aSLionel Sambuc  %dccf.2 = select i1 undef, <2 x double> %mul.i96, <2 x double> undef
20*f4a2713aSLionel Sambuc  unreachable
21*f4a2713aSLionel Sambuc
22*f4a2713aSLionel Sambucfor.end:                                          ; preds = %for.body
23*f4a2713aSLionel Sambuc  %vecins.i94 = insertelement <2 x double> undef, double 0.000000e+00, i32 0
24*f4a2713aSLionel Sambuc  %cmpsd.i = tail call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> %vecins.i94, <2 x double> <double 0x3FE984B204153B34, double 0x3FE984B204153B34>, i8 2) nounwind
25*f4a2713aSLionel Sambuc  tail call void (...)* @_mm_movemask_pd(<2 x double> %cmpsd.i) nounwind
26*f4a2713aSLionel Sambuc  br i1 undef, label %if.then67, label %if.end71
27*f4a2713aSLionel Sambuc
28*f4a2713aSLionel Sambucif.then67:                                        ; preds = %for.end
29*f4a2713aSLionel Sambuc  %vecins.i91 = insertelement <2 x double> %vecins.i94, double undef, i32 0
30*f4a2713aSLionel Sambuc  br label %if.end71
31*f4a2713aSLionel Sambuc
32*f4a2713aSLionel Sambucif.end71:                                         ; preds = %if.then67, %for.end
33*f4a2713aSLionel Sambuc  %theta.1 = phi <2 x double> [ %vecins.i91, %if.then67 ], [ %theta.0.ph, %for.end ]
34*f4a2713aSLionel Sambuc  br label %for.cond.outer
35*f4a2713aSLionel Sambuc
36*f4a2713aSLionel Sambucfor.end82:                                        ; preds = %for.cond.outer
37*f4a2713aSLionel Sambuc  ret void
38*f4a2713aSLionel Sambuc}
39*f4a2713aSLionel Sambuc
40*f4a2713aSLionel Sambucdeclare void @_mm_movemask_pd(...)
41*f4a2713aSLionel Sambuc
42*f4a2713aSLionel Sambucdeclare <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double>, <2 x double>, i8) nounwind readnone
43