google / clspv

Clspv is a compiler for OpenCL C to Vulkan compute shaders
Apache License 2.0
607 stars 88 forks source link

Fix trunc to bool handling #1380

Closed gnl21 closed 3 months ago

gnl21 commented 3 months ago

LLVM defines '%trunc = trunc i32 %2 to i1' as discarding the high bits of %2 prior to conversion, but the SPIRV-Producer pass was implementing it as '%2 != 0'. And away the high bits before doing the conversion.

Fixes #1379.

gnl21 commented 3 months ago

It looks like the MSVC autobuilder isn't working? It's complaining about the Python version available, so I don't think it can be related to this change.

rjodinchr commented 3 months ago

It looks like the MSVC autobuilder isn't working? It's complaining about the Python version available, so I don't think it can be related to this change.

This is a known issue, it's not related to this change.