afonso360 commented on issue #5031:
I'm really happy that we're finally doing this! Thank you for taking this on.
Some of our lowerings depend on the fact that bools can only be represented as all ones or all zeroes, and so now that we are removing that assumption we might want to revisit them.
The AArch64 implementation for
bmask
is wrong if we want to accept any integer other than -1 and 0. (i.e. 2 will be false, but should be true)
bint
is also assuming that inputs are all ones or all zeros and is implemented asand_imm
on AArch64.
afonso360 edited a comment on issue #5031:
I'm really happy that we're finally doing this! Thank you for taking this on.
Some of our lowerings depend on the fact that bools can only be represented as all ones or all zeroes, and so now that we are removing that assumption we might want to revisit them.
The AArch64 implementation for
bmask
is wrong if we want to accept any integer other than -1 and 0.
bint
is also assuming that inputs are all ones or all zeros and is implemented asand_imm
on AArch64. (i.e. 2 will be false, but should be true)
afonso360 edited a comment on issue #5031:
I'm really happy that we're finally doing this! Thank you for taking this on.
Some of our lowerings depend on the fact that bools can only be represented as all ones or all zeroes, and so now that we are removing that assumption we might want to revisit them.
The AArch64 implementation for
bmask
is wrong if we want to accept any integer other than -1 and 0. I would expect to get -1 if I do abmask
on a 2, but that's not what's going to happen. (I haven't tested this, but that's my reading of the implementation).
bint
is also assuming that inputs are all ones or all zeros and is implemented asand_imm
on AArch64. (i.e. 2 will be false, but should be true)
afonso360 edited a comment on issue #5031:
I'm really happy that we're finally doing this! Thank you for taking this on.
Some of our lowerings depend on the fact that bools can only be represented as all ones or all zeroes, and so now that we are removing that assumption we might want to revisit them.
The AArch64 implementation for
bmask
is wrong if we want to accept any integer other than -1 and 0. I would expect to get -1 if I do abmask
on a 2, but that's not what's going to happen. (I haven't tested this, but that's my reading of the implementation).
bint
is also assuming that inputs are all ones or all zeros and is implemented asand_imm
on AArch64. (i.e. 2 will be false, but should be true)Edit: AArch64 has instructions (
cset
andcsetm
) that represent these two operations, so we may want to partially revert b8f6d53a6bdf861e66093a046a081c886546cdf1 to get them back
cfallin commented on issue #5031:
Also, just to note it here: if at all possible, I'd prefer for us to wait to merge this until after my mid-end work in #4953 is merged, if only because they're both large and likely-to-conflict PRs and mine has been through ~three painful rebases already :-)
Last updated: Dec 23 2024 at 12:05 UTC