diff options
author | Andrzej Janik <[email protected]> | 2021-01-26 21:05:09 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-26 21:05:09 +0100 |
commit | 972f612562dc534ad605bfc5a00bc908ddd8b3de (patch) | |
tree | 7e4b764357965ab52892dbd79299afa308265710 /ptx/src/translate.rs | |
parent | 3e2e73ac33273fc23a6183b1e5bc0b2f754fa4fb (diff) | |
download | ZLUDA-972f612562dc534ad605bfc5a00bc908ddd8b3de.tar.gz ZLUDA-972f612562dc534ad605bfc5a00bc908ddd8b3de.zip |
Fix signed integer conversion (#36)
This fixes the last remaining bug preventing end-to-end GeekBench run, so also update Geekbench results in README
Diffstat (limited to 'ptx/src/translate.rs')
-rw-r--r-- | ptx/src/translate.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ptx/src/translate.rs b/ptx/src/translate.rs index 471a2d7..18d750f 100644 --- a/ptx/src/translate.rs +++ b/ptx/src/translate.rs @@ -4087,8 +4087,15 @@ fn emit_implicit_conversion( {
builder.u_convert(wide_bit_type_spirv, Some(cv.dst), same_width_bit_value)?;
} else {
+ let conversion_fn = if from_parts.scalar_kind == ScalarKind::Signed
+ && to_parts.scalar_kind == ScalarKind::Signed
+ {
+ dr::Builder::s_convert
+ } else {
+ dr::Builder::u_convert
+ };
let wide_bit_value =
- builder.u_convert(wide_bit_type_spirv, None, same_width_bit_value)?;
+ conversion_fn(builder, wide_bit_type_spirv, None, same_width_bit_value)?;
emit_implicit_conversion(
builder,
map,
|