#shift = affine_map<(d0)[s0] -> (d0 + s0)> #linear = affine_map<(d0, d1) -> (4 * d0 + d1)> module { func.func @shift(%N: index) -> index { %two = arith.constant 2 : index %r = affine.apply #shift(%two)[%N] func.return %r : index } func.func @linear(%i: index, %j: index) -> index { %k = affine.apply #linear(%i, %j) func.return %k : index } }