Skip to content

Instantly share code, notes, and snippets.

@EgorBo
Created August 29, 2019 23:28
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 EgorBo/219c5979272e2079b0d063ffbb7b7e19 to your computer and use it in GitHub Desktop.
Save EgorBo/219c5979272e2079b0d063ffbb7b7e19 to your computer and use it in GitHub Desktop.
define monocc float @"Program:MyAbsF (single)"(float %arg_x) #0 {
BB0:
%t22 = call float @llvm.fabs.f32(float %arg_x)
ret float %t22
}
define monocc float @"Program:MyCeilingF (single)"(float %arg_x) #0 {
BB0:
%t19 = call float @llvm.ceil.f32(float %arg_x)
ret float %t19
}
define monocc float @"Program:MyCosF (single)"(float %arg_x) #0 {
BB0:
%t19 = call float @llvm.cos.f32(float %arg_x)
ret float %t19
}
define monocc float @"Program:MyExpF (single)"(float %arg_x) #0 {
BB0:
%t19 = call float @llvm.exp.f32(float %arg_x)
ret float %t19
}
define monocc float @"Program:MyFloorF (single)"(float %arg_x) #0 {
BB0:
%t19 = call float @llvm.floor.f32(float %arg_x)
ret float %t19
}
define monocc float @"Program:MyLog2F (single)"(float %arg_x) #0 {
BB0:
%t19 = call float @llvm.log2.f32(float %arg_x)
ret float %t19
}
define monocc float @"Program:MyLog10F (single)"(float %arg_x) #0 {
BB0:
%t19 = call float @llvm.log10.f32(float %arg_x)
ret float %t19
}
define monocc float @"Program:MySinF (single)"(float %arg_x) #0 {
BB0:
%t19 = call float @llvm.sin.f32(float %arg_x)
ret float %t19
}
define monocc float @"Program:MySqrtF (single)"(float %arg_x) #0 {
BB0:
%t19 = call float @llvm.sqrt.f32(float %arg_x)
ret float %t19
}
define monocc float @"Program:MyTruncateF (single)"(float %arg_x) #0 {
BB0:
%t19 = call float @llvm.trunc.f32(float %arg_x)
ret float %t19
}
define monocc float @"Program:MyMinF (single,single)"(float %arg_x, float %arg_y) #0 {
BB0:
%.inv = fcmp ogt float %arg_x, %arg_y
%t26.v = select i1 %.inv, float %arg_y, float %arg_x
ret float %t26.v
}
define monocc float @"Program:MyMaxF (single,single)"(float %arg_x, float %arg_y) #0 {
BB0:
%.inv = fcmp olt float %arg_x, %arg_y
%t26.v = select i1 %.inv, float %arg_y, float %arg_x
ret float %t26.v
}
define monocc float @"Program:MyPowF (single,single)"(float %arg_x, float %arg_y) #0 {
BB0:
%t21 = call float @llvm.pow.f32(float %arg_x, float %arg_y)
ret float %t21
}
define monocc float @"Program:MyCopySignF (single,single)"(float %arg_x, float %arg_y) #0 {
BB0:
%t21 = call float @llvm.copysign.f32(float %arg_x, float %arg_y)
ret float %t21
}
define monocc float @"Program:MyFusedMultiplyAddF (single,single,single)"(float %arg_x, float %arg_y, float %arg_z) #0 {
BB0:
%t23 = call float @llvm.fma.f32(float %arg_x, float %arg_y, float %arg_z)
ret float %t23
}
;;; DOUBLE ;;;
define monocc double @"Program:MyAbs (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.fabs.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MyCeiling (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.ceil.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MyCos (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.cos.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MyExp (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.exp.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MyFloor (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.floor.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MyLog (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.log.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MyLog2 (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.log2.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MyLog10 (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.log10.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MySin (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.sin.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MySqrt (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.sqrt.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MyTruncate (double)"(double %arg_x) #0 {
BB0:
%t19 = call double @llvm.trunc.f64(double %arg_x)
ret double %t19
}
define monocc double @"Program:MyMin (double,double)"(double %arg_x, double %arg_y) #0 {
BB0:
%.inv = fcmp ogt double %arg_x, %arg_y
%t21 = select i1 %.inv, double %arg_y, double %arg_x
ret double %t21
}
define monocc double @"Program:MyMax (double,double)"(double %arg_x, double %arg_y) #0 {
BB0:
%.inv = fcmp olt double %arg_x, %arg_y
%t21 = select i1 %.inv, double %arg_y, double %arg_x
ret double %t21
}
define monocc double @"Program:MyPow (double,double)"(double %arg_x, double %arg_y) #0 {
BB0:
%t21 = call double @llvm.pow.f64(double %arg_x, double %arg_y)
ret double %t21
}
define monocc double @"Program:MyCopySign (double,double)"(double %arg_x, double %arg_y) #0 {
BB0:
%t21 = call double @llvm.copysign.f64(double %arg_x, double %arg_y)
ret double %t21
}
define monocc double @"Program:MyFusedMultiplyAdd (double,double,double)"(double %arg_x, double %arg_y, double %arg_z) #0 {
BB0:
%t23 = call double @llvm.fma.f64(double %arg_x, double %arg_y, double %arg_z)
ret double %t23
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment