Open RalfJung opened 11 months ago
I think there are many problems like this with multiple simd_ intrinsics and that's why it wasn't seen as a blocker for introducing these two new intrinsics recently.
We could use this issue to track improvements in this area. IMO, it would make sense to lift the validations that we're doing in the LLVM codegen crate, like these, into HIR, which is currently very basic and doesn't catch these monomorphization issues. I don't know exactly what would be involved though.
cc @calebzulawski @workingjubilee
I support lifting all of the type checking, because I really don't like writing the type checking in the codegen crate.
Yeah, I frankly have no idea why this wasn't done long ago, before I even started participating.
I tried this code:
This errors, saying:
However, the second argument has element type
*const u8
, even though the error says it has element typei8
.Actually the second argument should be a pointer. So talking about its "element type" doesn't even make a ton of sense.
Cc @farnoy