[RFC] Define precise arith semantics

To summarize the discussion in this and the index RFC thread, I think we are converging towards the following:

  1. Arith needs better defined semantics. These should be separate from LLVM to allow future design freedom on both sides, but LLVM seems like a good reference / starting point for most ops.

  2. To use the LLVM semantics, we need poison / freeze ops. Because this seems more broadly useful, we can put them in a new core-ish dialect, say undefined.

    • A dedicated RFC is necessary to cover this in detail.
  3. index support needs to move to a separate dialect.

    • This is partially covered by the index dialect RFC (it does not address the removal of index support from arith).
  4. tensor support needs to move out of arith as well:

    • A dedicated RFC is necessary to cover this in detail.
  5. n-D vector support may need to move out of arith as well:

    • This seems the least clear at this point.
2 Likes