Skip to content

Commit

Permalink
Fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jul 30, 2020
1 parent 96dff4e commit fb1bdc6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 17 deletions.
6 changes: 1 addition & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ fn main() -> anyhow::Result<()> {
"tests/wast/spec/proposals/multi-value",
wast_processor,
)?;
test_directory_module(
spectests,
"tests/wast/spec/proposals/simd",
wast_processor,
)?;
test_directory_module(spectests, "tests/wast/spec/proposals/simd", wast_processor)?;
// test_directory_module(spectests, "tests/wast/spec/proposals/bulk-memory-operations", wast_processor)?;
Ok(())
})?;
Expand Down
54 changes: 42 additions & 12 deletions lib/compiler-llvm/src/translator/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6218,8 +6218,13 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
8,
)?;
let v = self.builder.build_load(effective_address, "");
let v = self.builder.build_bitcast(v, self.intrinsics.i8_ty.vec_type(8), "").into_vector_value();
let res = self.builder.build_int_s_extend(v, self.intrinsics.i16x8_ty, "");
let v = self
.builder
.build_bitcast(v, self.intrinsics.i8_ty.vec_type(8), "")
.into_vector_value();
let res = self
.builder
.build_int_s_extend(v, self.intrinsics.i16x8_ty, "");
let res = self.builder.build_bitcast(res, self.intrinsics.i128_ty, "");
self.state.push1(res);
}
Expand All @@ -6234,8 +6239,13 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
8,
)?;
let v = self.builder.build_load(effective_address, "");
let v = self.builder.build_bitcast(v, self.intrinsics.i8_ty.vec_type(8), "").into_vector_value();
let res = self.builder.build_int_z_extend(v, self.intrinsics.i16x8_ty, "");
let v = self
.builder
.build_bitcast(v, self.intrinsics.i8_ty.vec_type(8), "")
.into_vector_value();
let res = self
.builder
.build_int_z_extend(v, self.intrinsics.i16x8_ty, "");
let res = self.builder.build_bitcast(res, self.intrinsics.i128_ty, "");
self.state.push1(res);
}
Expand All @@ -6250,8 +6260,13 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
8,
)?;
let v = self.builder.build_load(effective_address, "");
let v = self.builder.build_bitcast(v, self.intrinsics.i16_ty.vec_type(4), "").into_vector_value();
let res = self.builder.build_int_s_extend(v, self.intrinsics.i32x4_ty, "");
let v = self
.builder
.build_bitcast(v, self.intrinsics.i16_ty.vec_type(4), "")
.into_vector_value();
let res = self
.builder
.build_int_s_extend(v, self.intrinsics.i32x4_ty, "");
let res = self.builder.build_bitcast(res, self.intrinsics.i128_ty, "");
self.state.push1(res);
}
Expand All @@ -6266,8 +6281,13 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
8,
)?;
let v = self.builder.build_load(effective_address, "");
let v = self.builder.build_bitcast(v, self.intrinsics.i16_ty.vec_type(4), "").into_vector_value();
let res = self.builder.build_int_z_extend(v, self.intrinsics.i32x4_ty, "");
let v = self
.builder
.build_bitcast(v, self.intrinsics.i16_ty.vec_type(4), "")
.into_vector_value();
let res = self
.builder
.build_int_z_extend(v, self.intrinsics.i32x4_ty, "");
let res = self.builder.build_bitcast(res, self.intrinsics.i128_ty, "");
self.state.push1(res);
}
Expand All @@ -6282,8 +6302,13 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
8,
)?;
let v = self.builder.build_load(effective_address, "");
let v = self.builder.build_bitcast(v, self.intrinsics.i32_ty.vec_type(2), "").into_vector_value();
let res = self.builder.build_int_s_extend(v, self.intrinsics.i64x2_ty, "");
let v = self
.builder
.build_bitcast(v, self.intrinsics.i32_ty.vec_type(2), "")
.into_vector_value();
let res = self
.builder
.build_int_s_extend(v, self.intrinsics.i64x2_ty, "");
let res = self.builder.build_bitcast(res, self.intrinsics.i128_ty, "");
self.state.push1(res);
}
Expand All @@ -6298,8 +6323,13 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
8,
)?;
let v = self.builder.build_load(effective_address, "");
let v = self.builder.build_bitcast(v, self.intrinsics.i32_ty.vec_type(2), "").into_vector_value();
let res = self.builder.build_int_z_extend(v, self.intrinsics.i64x2_ty, "");
let v = self
.builder
.build_bitcast(v, self.intrinsics.i32_ty.vec_type(2), "")
.into_vector_value();
let res = self
.builder
.build_int_z_extend(v, self.intrinsics.i64x2_ty, "");
let res = self.builder.build_bitcast(res, self.intrinsics.i128_ty, "");
self.state.push1(res);
}
Expand Down

0 comments on commit fb1bdc6

Please sign in to comment.