Apple M1 Microarchitecture Research by Dougall Johnson

Firestorm: Overview | Base Instructions | SIMD and FP Instructions
Icestorm:  Overview | Base Instructions | SIMD and FP Instructions

SCVTF (scalar, fixed-point, H from X)

Test 1: uops

Code:

  scvtf h0, x0, #3
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 2.000

Issues: 2.000

Integer unit issues: 0.000

Load/store unit issues: 1.000

SIMD/FP unit issues: 1.000

retire (01)cycle (02)031e3f4f51inst issue (52)~issue fp/simd (54)~issue ld/st (55)~dispatch fp/simd (57)~dispatch ld/st (58)huge thing ld/st (5a)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op ld/st (7d)~map op fp/simd (7e)~map lookup ld/st (80)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst neon or fp (9a)a6a8accfd5d6ddinst fetch restart (de)e0ld/st retires (ed)? fp/simd (ee)f5f6f7f8fd
2004376303610252000100010001000100014075228201357376376723109200010001000100010003763761110011000100010733162237310001000377377377377377
2004376303610252000100010001000100014075228200357376376723109200010001000100010003763761110011000100000732162237310001000377377377377377
2004376303610252000100010001000100014075228200357376376723109200010001000100010003763761110011000100000732162237310001000377377377377377
2004376303610252000100010001000100014075228200357376376723109200010001000100010003763761110011000100000732162237310001000377377377377377
2004376303610252000100010001000100014075228200357376376723109200010001000100010003763761110011000100000732162237310001000377379377377377
2004376203650252000100010001000100014075229110357376376723109200010001000100010003763761110011000100000732162237310001000377377377377377
2004376303610252000100010001000100014075228200357376376723109200010001000100010003763771110011000100000732162237310001000377379377377377
2004376303610252000100010001000100014075228200357376376723109200010001000100010003763761110011000100000732162237410001000377377377380379
2004376303610252000100010001000100014075228200357376376723109200010001000100010003763761110011000100020732162237310001000377377377377382
2004376303610252000100010001000100014075228200357376376723109200010001000100010003763761110011000100000732162237310001000377378377377384

Test 2: Latency 1->2 roundtrip

Code:

  scvtf h0, x0, #3
  fmov x0, d0
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 13.0032

retire (01)cycle (02)03080b18191e1f3f4f51inst issue (52)~issue int (53)~issue fp/simd (54)~issue ld/st (55)~dispatch int (56)~dispatch fp/simd (57)~dispatch ld/st (58)huge thing int (59)huge thing ld/st (5a)huge thing fp/simd (5b)60696b6d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op ld/st (7d)~map op fp/simd (7e)~map lookup int (7f)~map lookup ld/st (80)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a8a9acc5cdcfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)ld/st retires (ed)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
302041300329740000001300171196072540100101002000010000100200001004950062144971480270911300130130032130033125466312624030429204100002000020010000200001300321300321120201100991001010010000100001000000300133012162212952410000100001000010100130033130033130036130033130033
30204131899994010100130017119556112401791011720003100001242000010000500621688214802709013001301311091303491254669126556301002001000020000200100002000013003213003211202011009910010100100001002210000001679300136612672312952310027100001000010100130033130128130033130033130033
302041300329740000001300171194112540100101002000010000100200001000050062166321480795701300130130365130033125466312624030100212100002048820010000200001300321300321120201100991001010010000100101000000600131012162212959910000100001000010100130582130033130033130033130033
3020413003297400101201301911194084740100101002000010002100200001000050062170141480270901300130130032130032125466312624030100200100002000020010000200001300321300321120201100991001010010000100001000010300131012162312951910000100001000010100130033130033130132130033130036
302041305749740070001300171194532540100101002000010000100200001000050062147851480270901300150130035130033125466312624030100200100002000020010000200001300321300351120201100991001010010000100001000000000133512163212958310000100001000010100130033130033130033130033130033
30204130032974000014401300171194082540100101002000010000100200001000050062144971480270901300130130032130032125466312624330100200100002000020010000200001300341300321120201100991001010010000100041000022000131012162212952010000100001000010100130033130033130034130033130033
30204130034974000027013001811940810840100101002000310002100200001000050062144971480305101300140130032130116125466312624030100200100002000020010000200001300321300331120201100991001010010000100001000010000131012162312959910030100001000010100130033130122130033130130130033
30204130032985112621201300171194082540100101002000010000100200001000050062144971480270911300150130032130032125466312624030100200100002000020010000200001300331300321120201100991001010010000100001000010300131012162212952110000100001000010100130033130033130034130033130033
302041300329740000001300181194092540100101002000010000100200001000050062146411480293111300130130032130032125466312624030100200100002000020010000200001300321300321120201100991001010010000100001000010300131012162212951910000100001000010100130033130033130034130034130033
3020413003297400002101300171194082540100101002000010000100200001000050062144971480270911300130130035130034125466312624030100200100002000020010000200001300321300321120201100991001010010000100001000010000131013172212951910000100001000010100130037130034130033130034130033

1000 unrolls and 10 iterations

Result (median cycles for code): 13.0032

retire (01)cycle (02)03080b18191e1f3f4f51inst issue (52)~issue int (53)~issue fp/simd (54)~issue ld/st (55)~dispatch int (56)~dispatch fp/simd (57)~dispatch ld/st (58)huge thing int (59)huge thing ld/st (5a)huge thing fp/simd (5b)60696b6d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op ld/st (7d)~map op fp/simd (7e)~map lookup int (7f)~map lookup ld/st (80)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa6a8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)ld/st retires (ed)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
30024130034975000012013001711940847400101001020003100001020000100005062144971480075611300130130032130032125491312626230010201000020000201000020000130032130032112002110910100101000010100000312701171112951910001100001000010010130125130300130033130124130036
30024130033975010012013001711940825400101001020000100001020000100005062145451480052811300130130032130033125489312626230010201000020000201000020000130033130035112002110910100101000010100000312701161112951910000100001000010010130033130033130033130033130033
30024130032974000012013001711940825400101001020003100001020113100495062144971480052811300130130112130033125492312626230010201000020000221000020000130032130032112002110910100101000010100000012701161112951910000100001000010010130033130033130033130033130033
3002413003297400000013001711940825400101001020000100001020238100005062144971480098211300130130032130032125489312626230010201000020000201000020000130032130032112002110910100101000010100000012701161112951910000100001000010010130033130033130033130033130035
3002413003297400000013001711940825400101001020000100001020000100005062148811480052811300130130032130032125489312626230010201000020000201000020000130032130032112002110910100101000010100000012701161212952010000100001000010010130033130033130033130033130033
3002413003297400000013001711940825400101001020000100001020000100005062144971480052811300130130032130032125489312626230010201000020000201000020000130032130032112002110910100101000010100000012701161112951910000100001000010010130033130033130033130033130133
3002413003297400000013001711940825400101001020000100001020000100005062144971480052811300130130032130032125489312626230010201000020000201000020000130032130032112002110910100101000010100000012701161212951910000100001000010010130033130033130033130033130033
3002413003297400000013001711940825400101001020000100001020000100005062144971480052811300130130032130032125489312626230010201000020000201000020000130032130032112002110910100101000010100000012701161112952310000100001000010010130033130033130033130033130033
3002413003297400000013001711940825400101001020000100001020000100005062144971480052811300130130032130032125489312626230010201000020000201000020000130032130032112002110910100101000010100000012702161112951910000100001000010010130033130033130033130033130033
3002413003297400000013001711940825400101001020000100001020000100005062144971480052811300133130032130032125489312626230010201000020000201000020000130032130032112002110910100101000010100000012701161112951910000100001000010010130033130033130033130033130033

Test 3: throughput

Count: 8

Code:

  scvtf h0, x8, #3
  scvtf h1, x8, #3
  scvtf h2, x8, #3
  scvtf h3, x8, #3
  scvtf h4, x8, #3
  scvtf h5, x8, #3
  scvtf h6, x8, #3
  scvtf h7, x8, #3
  mov x8, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code divided by count): 0.3339

retire (01)cycle (02)0318191e3f4f51inst issue (52)~issue int (53)~issue fp/simd (54)~issue ld/st (55)~dispatch int (56)~dispatch fp/simd (57)~dispatch ld/st (58)huge thing int (59)huge thing ld/st (5a)huge thing fp/simd (5b)60696d6edispatch stall (70)72scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op ld/st (7d)~map op fp/simd (7e)~map lookup int (7f)~map lookup ld/st (80)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa5a6acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0ld/st retires (ed)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020426711199000266940251601001008000080000100800208001550011689511884163026695267092670966320666581601362008002080020200800208002026709267921180201100991001008000010008000001115117216002670680000800001002671026710267102671026710
16020426709200000266940251601001008000080000100800208001550011689511884163026690267092670966320666581601352008002080020200800208002026709267091180201100991001008000010008000001115117016002670680000800001002671026710267102671026710
16020426709200000266940251601001008000080000100800208001550011689511884163126690267092670966320666581601352008002080020200800208002026709267091180201100991001008000010008000001115117016002670680000800001002671026710267102671026710
16020426709200000266940251601001008000080000100800208001550011689511884163026690267092670966320666581601352008002080020200800208002426753268741180201100991001008000010008000001115117016002670980000800001002671026710267102671026710
16020426709200110266940251601001008000080000100800208001550011689511884163026690267092670966320666581601352008002080020200800208002026709267091180201100991001008000010008000001115117016002670680000800001002671026710267102671026710
16020426709199000266940251601001008000080000100800208001550011689511884163026690267092670966320666581601352008002080020200800208002026709267091180201100991001008000010008000001115117016002670680000800001002671026710267102671026710
16020426709200000266940251601001008000080000100800208001550011689511884163126690267092670966320666581601352008002080020200800208002026709267091180201100991001008000010008000001115117016002670680000800001002671026710267102671026710
16020426709200000266940251601001008000080000100800208001550011689511884163126690267092670966320666581601352008002080020200800208002026709267091180201100991001008000010008000001115117016002670680000800001002671026710267102671026710
16020426709200100266940251601001008000080000100800208001550011689511884163026690267092670966320666581601352008002080020200800208002026709267091180201100991001008000010008000001115117016002681980000800001002671026710267102671026710
16020426709200010266940251601001008000080000100800208001550011689511884163026690267092670966320666581601352008002080020200800208002026709267091180201100991001008000010008000001115117016002670680000800001002671026710267102671026710

1000 unrolls and 10 iterations

Result (median cycles for code divided by count): 0.3339

retire (01)cycle (02)03070818191e1f3f4f51inst issue (52)~issue int (53)~issue fp/simd (54)~issue ld/st (55)~dispatch int (56)~dispatch fp/simd (57)~dispatch ld/st (58)huge thing int (59)huge thing ld/st (5a)huge thing fp/simd (5b)696d6edispatch stall (70)72scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op ld/st (7d)~map op fp/simd (7e)~map lookup int (7f)~map lookup ld/st (80)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a5a6a8a9acc2cficache miss (d3)itlb miss (d4)d5d6ddinst fetch restart (de)e0ld/st retires (ed)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600242671220000001202669402516001010800008000010800008000050116827318840322669426713267136657036689160010208000080000208000080000267132672111800211091010800001000080000000050200071655267108000080000102671026714267102671526710
1600242670920000001202669822516001010800008000010800008000050116888018840322669426713267096653036689160010208038180000208000080000267132671311800211091010800001000080000103050200161665267068000080000102671426710267152671426714
1600242670920000001202670252516001010800008000010800008000050116888018744662669026713267136653036689160010208000080000208000080000267142670911800211091010800001000080000103050200171656267068000080000102739526715267142671426884
16002426713200000017402669402516001010800008000010800008000050116789018802602669026709267126656036693160010208000080000208000080000267092671311800211091010800001000080000103050200061656267068000080000102671426714267142671426714
160024267132000000002669822516001010800008000010800008000050118164718828532669027215267166654036689160010208000080000208000080000267092671311800211091010800001000080000103050200071665267108000080000102671026714267142671526714
160024267092000000002669802516001010800008000010800008000050116844018840122669026709267136653036689160010208000080000208000080000267092671411800211091010800001000080000000050200051677267108000080000102671426710267152671026714
160024267092000000002669822516001010800008000010800008000050116870718835252669526709267096653036689160010208000080000208000080000267142671311800211091010800001000080000103050200071675267098000080000102671426710267142671026714
16002426713200000012026698225160010108000080000108000080000501174994188285426694267092670966570366931600102080000800002080000800002671326714118002110910108000010000800001012050200051665267118000080000102671426714267142671026715
1600242671320000001202669822516001010800008000010800008000050117049318807942669426713267096657036689160010208000080000208000080000267132671311800211091010800001000080000103050200061665267068000080000102671526714267152671426714
1600242671420000001202669822516001010800008000010800008000050115708918840522669426710267136653036693160010208000080000208000080000267092671311800211091010800001000080000000050200061646267108000080000102671026714267142671426714