Skip to content

Instantly share code, notes, and snippets.

Created June 14, 2015 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5029a142fcc946d708a8 to your computer and use it in GitHub Desktop.
Save anonymous/5029a142fcc946d708a8 to your computer and use it in GitHub Desktop.
; ModuleID = 'WinterModule'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
%struct.barney.1 = type { %struct.quux, float, float, float, float }
%struct.quux = type { <8 x float> }
%struct.eggs.2 = type { float, i1 }
%struct.hoge.3 = type { %struct.bar, %struct.bar, %struct.bar, %struct.bar, i32*, i32*, i32*, %struct.hoge, %struct.barney.4, i32*, float, i1, i1, i1, i32*, i32* }
%struct.bar = type { <4 x float> }
%struct.hoge = type { <2 x float> }
%struct.barney.4 = type { %struct.hoge, i32 }
@global22 = private unnamed_addr constant [14 x i8] c"a_dot_orig_Ng\00"
@global23 = private unnamed_addr constant [9 x i8] c"a_dot_Ns\00"
@global24 = private unnamed_addr constant [9 x i8] c"b_dot_Ns\00"
@global25 = private unnamed_addr constant [17 x i8] c"a_dot_prebump_Ns\00"
@global26 = private unnamed_addr constant [17 x i8] c"smoothing_factor\00"
@global27 = private unnamed_addr constant [15 x i8] c"x_for_n_dot_k1\00"
@global28 = private unnamed_addr constant [15 x i8] c"x_for_n_dot_k2\00"
@global88 = private unnamed_addr constant [8 x i8] c"use_dot\00"
; Function Attrs: nounwind readnone
declare float @llvm.fabs.f32(float) #0
declare void @blam174(i8*, float)
; Function Attrs: nounwind readnone
declare <4 x float> @llvm.x86.sse41.dpps(<4 x float>, <4 x float>, i8) #0
; Function Attrs: nounwind
define void @pluto323(%struct.barney.1* noalias nocapture sret %arg, %struct.eggs.2* noalias nocapture readonly %arg12, %struct.hoge.3* noalias nocapture readonly %arg13, %struct.bar* noalias nocapture readonly %arg14, %struct.bar* noalias nocapture readonly %arg15, %struct.quux* noalias nocapture readonly %arg16) #1 {
bb:
%tmp17.sroa.0 = alloca <4 x float>, align 16
%tmp18.sroa.0 = alloca <4 x float>, align 16
%arg14.idx55 = getelementptr %struct.bar* %arg14, i64 0, i32 0
%arg14.idx55.val = load <4 x float>* %arg14.idx55, align 16
%tmp19.idx56 = getelementptr %struct.hoge.3* %arg13, i64 0, i32 0, i32 0
%tmp19.idx56.val = load <4 x float>* %tmp19.idx56, align 16
%tmp.i.i = tail call <4 x float> @llvm.x86.sse41.dpps(<4 x float> %arg14.idx55.val, <4 x float> %tmp19.idx56.val, i8 -1) #1
%tmp2.i.i = extractelement <4 x float> %tmp.i.i, i32 0
tail call void @blam174(i8* getelementptr inbounds ([14 x i8]* @global22, i64 0, i64 0), float %tmp2.i.i) #1
%tmp21 = getelementptr inbounds %struct.hoge.3* %arg13, i64 0, i32 1
%tmp21.idx53 = getelementptr %struct.bar* %tmp21, i64 0, i32 0
%tmp21.idx53.val = load <4 x float>* %tmp21.idx53, align 16
%tmp.i.i66 = tail call <4 x float> @llvm.x86.sse41.dpps(<4 x float> %tmp21.idx53.val, <4 x float> %tmp19.idx56.val, i8 -1) #1
%tmp2.i.i67 = extractelement <4 x float> %tmp.i.i66, i32 0
%tmp24 = fmul nnan ninf nsz float %tmp2.i.i, %tmp2.i.i67
%tmp25 = fcmp ogt float %tmp24, 0.000000e+00
br i1 %tmp25, label %bb30.thread, label %bb39
bb30.thread: ; preds = %bb
%tmp3881 = getelementptr inbounds %struct.hoge.3* %arg13, i64 0, i32 2
br label %bb41
bb39: ; preds = %bb
%tmp17.sroa.0.0.tmp17.sroa_cast = bitcast <4 x float>* %tmp17.sroa.0 to %struct.bar*
%tmp18.sroa.0.0.tmp18.sroa_cast = bitcast <4 x float>* %tmp18.sroa.0 to %struct.bar*
%tmp3.i7785 = fsub nnan ninf nsz <4 x float> <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00>, %tmp21.idx53.val
store <4 x float> %tmp3.i7785, <4 x float>* %tmp18.sroa.0, align 16
%tmp38.idx = getelementptr %struct.hoge.3* %arg13, i64 0, i32 2, i32 0
%tmp38.idx.val = load <4 x float>* %tmp38.idx, align 16
%tmp3.i = fsub nnan ninf nsz <4 x float> <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00>, %tmp38.idx.val
store <4 x float> %tmp3.i, <4 x float>* %tmp17.sroa.0, align 16
br label %bb41
bb41: ; preds = %bb30.thread, %bb39
%tmp3182 = phi %struct.bar* [ %tmp18.sroa.0.0.tmp18.sroa_cast, %bb39 ], [ %tmp21, %bb30.thread ]
%tmp42 = phi %struct.bar* [ %tmp17.sroa.0.0.tmp17.sroa_cast, %bb39 ], [ %tmp3881, %bb30.thread ]
%tmp31.idx52 = getelementptr %struct.bar* %tmp3182, i64 0, i32 0
%tmp31.idx52.val = load <4 x float>* %tmp31.idx52, align 16
%tmp.i.i72 = tail call <4 x float> @llvm.x86.sse41.dpps(<4 x float> %arg14.idx55.val, <4 x float> %tmp31.idx52.val, i8 -1) #1
%tmp2.i.i73 = extractelement <4 x float> %tmp.i.i72, i32 0
tail call void @blam174(i8* getelementptr inbounds ([9 x i8]* @global23, i64 0, i64 0), float %tmp2.i.i73) #1
%arg15.idx = getelementptr %struct.bar* %arg15, i64 0, i32 0
%arg15.idx.val = load <4 x float>* %arg15.idx, align 16
%tmp31.idx.val = load <4 x float>* %tmp31.idx52, align 16
%tmp.i.i70 = tail call <4 x float> @llvm.x86.sse41.dpps(<4 x float> %arg15.idx.val, <4 x float> %tmp31.idx.val, i8 -1) #1
%tmp2.i.i71 = extractelement <4 x float> %tmp.i.i70, i32 0
tail call void @blam174(i8* getelementptr inbounds ([9 x i8]* @global24, i64 0, i64 0), float %tmp2.i.i71) #1
%tmp42.idx = getelementptr %struct.bar* %tmp42, i64 0, i32 0
%tmp42.idx.val = load <4 x float>* %tmp42.idx, align 16
%tmp.i.i68 = tail call <4 x float> @llvm.x86.sse41.dpps(<4 x float> %arg14.idx55.val, <4 x float> %tmp42.idx.val, i8 -1) #1
%tmp2.i.i69 = extractelement <4 x float> %tmp.i.i68, i32 0
tail call void @blam174(i8* getelementptr inbounds ([17 x i8]* @global25, i64 0, i64 0), float %tmp2.i.i69) #1
%tmp.i64 = fmul nnan ninf nsz float %tmp2.i.i69, 5.000000e+00
%tmp.i.i65 = fcmp olt float %tmp.i64, %tmp2.i.i73
%arg.arg1.i.i = select i1 %tmp.i.i65, float %tmp.i64, float %tmp2.i.i73
tail call void @blam174(i8* getelementptr inbounds ([8 x i8]* @global88, i64 0, i64 0), float %arg.arg1.i.i) #1
%tmp.i9.i.v.i0 = shufflevector <4 x float> %tmp.i.i, <4 x float> %tmp.i.i72, <2 x i32> <i32 0, i32 4>
%tmp.i9.i = tail call <2 x float> @llvm.fabs.v2f32(<2 x float> %tmp.i9.i.v.i0) #1
%tmp.i9.i.v.r1 = extractelement <2 x float> %tmp.i9.i, i32 0
%tmp.i9.i.v.r2 = extractelement <2 x float> %tmp.i9.i, i32 1
%tmp5.i = fdiv nnan ninf nsz float %arg.arg1.i.i, %tmp.i9.i.v.r1
%tmp.i7.i = fcmp ogt float %tmp5.i, 0.000000e+00
%arg.arg1.i8.i = select i1 %tmp.i7.i, float %tmp5.i, float 0.000000e+00
tail call void @blam174(i8* getelementptr inbounds ([17 x i8]* @global26, i64 0, i64 0), float %arg.arg1.i8.i) #1
%tmp1.i63 = fsub nnan ninf nsz float 1.000000e+00, %tmp.i9.i.v.r2
tail call void @blam174(i8* getelementptr inbounds ([15 x i8]* @global27, i64 0, i64 0), float %tmp1.i63) #1
%tmp.i61 = tail call float @llvm.fabs.f32(float %tmp2.i.i71) #1
%tmp.i.i60 = tail call float @llvm.sqrt.f32(float %tmp.i61) #1
%tmp1.i = fsub nnan ninf nsz float 1.000000e+00, %tmp.i.i60
tail call void @blam174(i8* getelementptr inbounds ([15 x i8]* @global28, i64 0, i64 0), float %tmp1.i) #1
%tmp50 = fmul nnan ninf nsz float %tmp1.i63, %tmp1.i
%tmp.i58 = insertelement <8 x float> undef, float %tmp50, i32 0
%tmp2.i = shufflevector <8 x float> %tmp.i58, <8 x float> undef, <8 x i32> zeroinitializer
%tmp.val.fca.0.insert = insertvalue %struct.quux undef, <8 x float> %tmp2.i, 0
%tmp.i = getelementptr inbounds %struct.barney.1* %arg, i64 0, i32 0
store %struct.quux %tmp.val.fca.0.insert, %struct.quux* %tmp.i, align 32, !alias.scope !0
%tmp7.i = getelementptr inbounds %struct.barney.1* %arg, i64 0, i32 1
%0 = bitcast float* %tmp7.i to i8*
tail call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 16, i32 32, i1 false) #1, !alias.scope !0
ret void
}
; Function Attrs: nounwind readnone
declare float @llvm.sqrt.f32(float) #0
; Function Attrs: nounwind
declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) #1
; Function Attrs: nounwind readnone
declare <2 x float> @llvm.fabs.v2f32(<2 x float>) #0
attributes #0 = { nounwind readnone }
attributes #1 = { nounwind }
!0 = !{!1}
!1 = distinct !{!1, !2, !"snork146: %arg"}
!2 = distinct !{!2, !"snork146"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment