-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Int(true) == 255
with broadcasting?
#52127
Comments
I reproduced your issue. If I provide a type annotation to
|
Curious...
|
I haven't run
Everything points to a bug in LLVM 14. |
Looks like our generated IR here is wrong. It is not legal to take this bitcast, since most of the bits are undef:
On some versions of LLVM, it takes the liberty to replace those undef bits with -1. On other versions, it takes those liberties to instead give up and not optimize the function instead. (can't repro this on master exactly, but can confirm the generated IR is still wrong) |
Teach value_to_pointer to convert primitive types to their stored representation first, to avoid exposing undef bits later (via memcpy). Take this opportunity to also generalizes the support for zext Bool to anywhere inside any struct for changing any bitwidth to a multiple of 8 bytes. This would change a vector like <2 x i4> from occupying i8 to i16 (c.f. LLVM's LangRef), if such an operation were expressible in Julia today. And take this opportunity to do a bit of code cleanup, now that codegen is better and using helpers from LLVM. Fixes #52127
Teach value_to_pointer to convert primitive types to their stored representation first, to avoid exposing undef bits later (via memcpy). Take this opportunity to also generalizes the support for zext Bool to anywhere inside any struct for changing any bitwidth to a multiple of 8 bytes. This would change a vector like <2 x i4> from occupying i8 to i16 (c.f. LLVM's LangRef), if such an operation were expressible in Julia today. And take this opportunity to do a bit of code cleanup, now that codegen is better and using helpers from LLVM. Fixes #52127
Teach value_to_pointer to convert primitive types to their stored representation first, to avoid exposing undef bits later (via memcpy). Take this opportunity to also generalizes the support for zext Bool to anywhere inside any struct for changing any bitwidth to a multiple of 8 bytes. This would change a vector like <2 x i4> from occupying i8 to i16 (c.f. LLVM's LangRef), if such an operation were expressible in Julia today. And take this opportunity to do a bit of code cleanup, now that codegen is better and using helpers from LLVM. Fixes #52127 (cherry picked from commit 9aa7980)
Teach value_to_pointer to convert primitive types to their stored representation first, to avoid exposing undef bits later (via memcpy). Take this opportunity to also generalizes the support for zext Bool to anywhere inside any struct for changing any bitwidth to a multiple of 8 bytes. This would change a vector like <2 x i4> from occupying i8 to i16 (c.f. LLVM's LangRef), if such an operation were expressible in Julia today. And take this opportunity to do a bit of code cleanup, now that codegen is better and using helpers from LLVM. Fixes #52127 (cherry picked from commit 9aa7980)
only in 1.9.0-1.9.3, I get this strange bug (not 1.8, not 1.10.0-rc1)
It seems to happen only when
f
is non type-stableThe text was updated successfully, but these errors were encountered: