Fix example code

This commit is contained in:
Chunmyong Park
2020-06-10 10:47:32 +00:00
parent 9ca05ba893
commit 6146714112
8 changed files with 7 additions and 14 deletions

View File

@@ -7886,7 +7886,7 @@ block b0:
%b0:i20:f64 = minus 0.8836803984453947:f64
%b0:i21:f32 = typecast %b0:i20:f64 to f32
%b0:i22:unit = store %b0:i21:f32 %l9:*f32
%b0:i23:unit = store 0.02298282564015198:f64 %l10:*f64
%b0:i23:unit = store 1.022982825640152:f64 %l10:*f64
%b0:i24:f32 = typecast 0.768435276037987:f64 to f32
%b0:i25:unit = store %b0:i24:f32 %l11:*f32
%b0:i26:f64 = typecast 2.0350472927093506:f32 to f64

View File

@@ -1706,7 +1706,7 @@ double func_53()
double h = 0.5573622064055939;
double i = -0.24231501222959176;
float j = -0.8836803984453947;
double k = 0.02298282564015198;
double k = 1.02298282564015198;
float l = 0.768435276037987;
double m = 2.0350472413013128f;
double n = -1.3339335818980034;

View File

@@ -7886,7 +7886,7 @@ block b0:
%b0:i20:f64 = minus 0.8836803984453947:f64
%b0:i21:f32 = typecast %b0:i20:f64 to f32
%b0:i22:unit = store %b0:i21:f32 %l9:*f32
%b0:i23:unit = store 0.02298282564015198:f64 %l10:*f64
%b0:i23:unit = store 1.022982825640152:f64 %l10:*f64
%b0:i24:f32 = typecast 0.768435276037987:f64 to f32
%b0:i25:unit = store %b0:i24:f32 %l11:*f32
%b0:i26:f64 = typecast 2.0350472927093506:f32 to f64

View File

@@ -7739,7 +7739,7 @@ block b0:
%b0:i20:f64 = minus 0.8836803984453947:f64
%b0:i21:f32 = typecast %b0:i20:f64 to f32
%b0:i22:unit = store %b0:i21:f32 %l9:*f32
%b0:i23:unit = store 0.02298282564015198:f64 %l10:*f64
%b0:i23:unit = store 1.022982825640152:f64 %l10:*f64
%b0:i24:f32 = typecast 0.768435276037987:f64 to f32
%b0:i25:unit = store %b0:i24:f32 %l11:*f32
%b0:i26:f64 = typecast 2.0350472927093506:f32 to f64

View File

@@ -7818,7 +7818,7 @@ block b0:
%b0:i99:f64 = sub %b0:i18:f64 %b0:i98:f64
%b0:i100:f64 = typecast %b0:i21:f32 to f64
%b0:i101:f64 = add %b0:i100:f64 %b0:i99:f64
%b0:i102:f64 = div 0.02298282564015198:f64 %b0:i101:f64
%b0:i102:f64 = div 1.022982825640152:f64 %b0:i101:f64
%b0:i103:f64 = typecast %b0:i24:f32 to f64
%b0:i104:f64 = div %b0:i103:f64 %b0:i102:f64
%b0:i105:f64 = div %b0:i26:f64 %b0:i104:f64

View File

@@ -3818,7 +3818,7 @@ block b0:
%b0:i45:f64 = sub %b0:i10:f64 %b0:i44:f64
%b0:i46:f64 = typecast %b0:i12:f32 to f64
%b0:i47:f64 = add %b0:i46:f64 %b0:i45:f64
%b0:i48:f64 = div 0.02298282564015198:f64 %b0:i47:f64
%b0:i48:f64 = div 1.022982825640152:f64 %b0:i47:f64
%b0:i49:f64 = typecast %b0:i13:f32 to f64
%b0:i50:f64 = div %b0:i49:f64 %b0:i48:f64
%b0:i51:f64 = div %b0:i14:f64 %b0:i50:f64

View File

@@ -3818,7 +3818,7 @@ block b0:
%b0:i45:f64 = sub %b0:i10:f64 %b0:i44:f64
%b0:i46:f64 = typecast %b0:i12:f32 to f64
%b0:i47:f64 = add %b0:i46:f64 %b0:i45:f64
%b0:i48:f64 = div 0.02298282564015198:f64 %b0:i47:f64
%b0:i48:f64 = div 1.022982825640152:f64 %b0:i47:f64
%b0:i49:f64 = typecast %b0:i13:f32 to f64
%b0:i50:f64 = div %b0:i49:f64 %b0:i48:f64
%b0:i51:f64 = div %b0:i14:f64 %b0:i50:f64

View File

@@ -303,13 +303,6 @@ pub fn test_asmgen(path: &Path) {
// TODO: test all the way down to assembly
pub fn test_end_to_end(path: &Path) {
// TODO: delete ignore list in the future
let ignore_list = vec!["examples/c/float2.c"];
if ignore_list.contains(&path.to_str().expect("`path` must be transformed to `&str`")) {
println!("skip test");
return;
}
// Check if the file has .c extension
assert_eq!(path.extension(), Some(std::ffi::OsStr::new("c")));
let unit = c::Parse::default()