fix(compiler): classify scalar pointer tiles structurally - #226
fix(compiler): classify scalar pointer tiles structurally#226lucifer1004 wants to merge 4 commits into
Conversation
|
Thanks @lucifer1004 — you did find a real panic here, but I don't want to fix it by moving the classification.
The actual bug is in the primitive element-type path: Reclassifying isn't a no-op either: If you can move the fix into the extractor and add a test that actually reproduces the panic — compile a kernel that queries the element type of a scalar pointer tile, not just an assert on the |
Summary
TileRustType::from_scalar_ptrclassified scalar pointer tiles asKind::PrimitiveType. A scalar pointer tile (PointerTile<*mut T, {[]}>)lowers to a structured
!cuda_tile.tiletype like every other tile, so theprimitive classification misroutes it in code paths that treat primitives
specially (e.g. ABI handling that assumes scalars map to plain LLVM values).
Classify it structurally as
Kind::StructuredTypeinstead.Test
Adds a unit test asserting the structural classification.
cargo test -p cutile-compiler --libpasses.