Repository navigation
Conversation
A vector literal lowered to vector.undef plus vector.insertelement and an alias line, the retired Python generator's output; MLIR 22 has neither op, and the alias is no valid MLIR. It is now one vector.from_elements of lanes cast to the first element's type. mlg_cast converts between vectors of the same length lane by lane, so the literal meets a declared vecN<T>, and in an operator a literal takes the other operand's type. Fixture: compiler/fixtures/mlir/vector_literal.flow.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: godofecht <[email protected]>
|
Resolved conflicts with current |
|
CI repair update (2026-11-02, head |
Cause
A vector literal
<a, b, c, d>lowered tovector.undefplus onevector.insertelementper lane, then an alias line%r = %last : T. Thatis the retired Python generator's output.
vector.undefandvector.insertelementare gone from MLIR 22, so mlir-opt failed with"custom op 'vector.undef' is unknown", and the alias line is no valid
MLIR at all. The literal was also typed from its first element (f64 for
1.0) and met avec4<f32>with no conversion, andmlg_expr_mtcalledevery vector literal i32. 2 corpus programs failed this way
(
tests/simd/test_simple_simd.flow,tests/simd/test_simd_vector.flow).Fix
vector.from_elements, its lanes cast to thetype of the first element.
mlg_castconverts between vectors of the same length lane by lane(
arith.extf,truncf,sitofp,fptosi,extsi,truncion thevector type), so the literal meets the declared
vecN<T>of a let, areturn or an argument.
type, and
mlg_expr_mtagrees.Regression fixture:
compiler/fixtures/mlir/vector_literal.flow(an f32literal returned, literals on either side of
*,+and-, and ani64 vector). On main it fails in mlir-opt with "custom op 'vector.undef'
is unknown".
Counts
mlir_vs_c --only tests/simd/(4 programs):Full corpus run (
mlir_vs_c --jobs 8): queued behind the machine-wide corpus lock; the before and after counts will be added here.Gates
bootstrap_from_c.sh --regen, then--verify: PASSmlir_math_override, which fails in itsC-backend half (
flow run --backend=cexits 1). This change touches onlythe MLIR emitter, so the C path is the same as on main.
Regenerated state
compiler/bootstrap/flowc_stage_a.candcompiler/bootstrap/flowc_stage_a,in their own last commit.
compiler/fixtures/mlir/vector_literal.mlirand.out, recorded withparity_mlir.flow --record.compiler/fixtures/mlir/corpus.txt: the digests oftests/simd/test_simd_vector.flowandtests/simd/test_simple_simd.flowmove, since their vector literals are nowvector.from_elements. No other digest moved.--recordalso wanted to add 11 programs this change does not affect (corpus drift on main); those lines are left out.Risk
Low. Only vector literals and casts between two vector types change; both
produced MLIR that mlir-opt rejected before.
Needs review by a CODEOWNER (touches compiler/).