Apple M1 Microarchitecture Research by Dougall Johnson

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

FSQRT (vector, 2S)

Test 1: uops

Code:

  fsqrt v0.2s, v0.2s
  movi v0.16b, 1
  movi v1.16b, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 0.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 1.000

retire (01)cycle (02)0308181e1f3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op fp/simd (7e)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst neon or fp (9a)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004100377600006186482510001000100035194110018100371003793953989510001000100010037100371110011000007311611957810001003810038100381003810038
10041003775002106186482510001000100035194110018100371003793953989510001000100010037100371110011000007311611957810001003810038100381003810038
1004100377500006186482510001000100035194110018100371003793953989510001000100010037100371110011000007311611957810001003810038100381003810038
1004100377500006186482510001000100035194110018100371003793953989510001000100010037100371110011000007311611957810001003810038100381003810038
1004100377500006186482510001000100035194110018100371003793953989510001000100010037100371110011000007311611957810001003810038100381003810038
10041003775000061864825100010001000351941100181003710037939539895100010001000100371003711100110002407311611957810001003810038100381003810038
1004100377500006186482510001000100035194110018100371003793953989510001000100010037100371110011000007311611957810001003810038100381003810038
100410037750030306186482510001000100035194110018100371003793953989510001000100010037100371110011000007311611957810001003810038100381003810038
1004100377500006186482510001000100035194110018100371003793953989510001000100010037100371110011000007311611957810001003810038100381003810038
1004100377500006186482510001000100035194110018100371003793953989510001000100010037100371110011000007311611957810001003810086100381003810038

Test 2: Latency 1->2

Code:

  fsqrt v0.2s, v0.2s
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 10.0037

retire (01)cycle (02)0318191e1f3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696b6d6edispatch stall (70)72scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~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)9fa0a1a8acbranch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102041000377490060726896382510105108100001041019050035835770100053010003710003798245039884010100205100002001005510003710003791102011009910010010000100221307101161199578010000100100038100038100038100038100038
10204100037749000061896482510100100100001001000050035829410100018010003710003798245039874510100200100002001000010003710003711102011009910010010000100000007101161199578010000100100038100038100038100038100038
10204100037749000061896482510100100100001001000050035829410100018010003710003798245039874510100200100002001000010003710003711102011009910010010000100000007101161199578010000100100038100038100038100038100038
10204100037749000061896482510100100100001001000050035829410100018010003710003798245039874510100200100002001000010003710003711102011009910010010000100000007101161199578010000100100038100038100038100038100038
102041000377490000726896482510100100100001001000050035829410100018010003710003798245039874510100200100002001000010003710003711102011009910010010000100000007101161199578010000100100038100038100038100038100038
102041000377490000618964825101001001000310010000500358294101000180100037100037982450398745101002021000020010000100037100037111020110099100100100001000006607101161199578010000100100038100038100038100038100038
10204100037749000061896482510100100100001001000050035829410100018010003710003798245039874510100200100002001000010003710003711102011009910010010000100000007101161199578010000100100038100038100038100038100038
10204100037749000061896482510100100100001001000050035829410100018010003710003798245039874510100200100002001000010003710003711102011009910010010000100000007101161199578010000100100038100038100038100038100038
10204100037750000061896482510100100100001001000050035831490100018010003710003798245039874510100200100002001000010008410003711102011009910010010000100000007101161199578010000100100038100038100038100038100038
102041000377500000536896482510100100100001001000050035829410100018010003710003798245039874510100200100002001000010003710003711102011009910010010000100000007101161199578010000100100038100038100038100038100038

1000 unrolls and 10 iterations

Result (median cycles for code): 10.0037

retire (01)cycle (02)03080b18191e1f3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~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)9fa0a1a6a8a9acc2c5cfd5d6ddinst fetch restart (de)e0? int output thing (e9)ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024100037750000018002262896482510010101000010100005035829411100018100037100037982673987671001022100002010000100037100037111002110910101000010000003006403162299578001000010100038100038100038100038100038
1002410003775000000002275896482510010101000010100005035829410100018100037100037982673987671001020100002010000100037100037111002110910101000010000000006402162299578001000010100038100038100038100038100038
1002410003774900000002116896482510010101000010100005035829410100018100037100037982673987671001020100002010000100037100037111002110910101000010000000006402162299578001000010100038100038100038100038100038
1002410003775000000003003896482510010101000010100005035829411100018100037100037982673987671001020100002010000100037100037111002110910101000010000000006402162299578001000010100038100038100038100038100038
100241000377490000000634896482510010101000010100005035829411100018100037100037982673987671001020100002010000100037100037111002110910101000010000000006402162299578001000010100038100038100038100038100038
100241000377500000000147896482510010101000010100005035829411100018100037100070982673987671001020100002010000100037100037111002110910101000010000000006402162299578001000010100038100038100038100038100038
1002410003774900000002196896482510010101000010100005035829410100018100037100037982673987671001020100002010000100037100037111002110910101000010000000006402162299578001000010100038100038100038100038100038
1002410003775000000002184896482510010101000010100005035829411100158100037100037982673987671001020100002010000100037100037111002110910101000010000000006402162299578001000010100038100038100038100038100038
1002410003774900000001420896482510010121000010100005035829410100018100037100037982673987671001020100002010000100037100037111002110910101000010000000006402162299578101000010100038100038100038100038100038
100241000377500000000147896482510010101000010100005035829410100018100037100037982673987671001020100002010000100037100037111002110910101000010000000006402162299578001000010100038100038100038100038100226

Test 3: throughput

Count: 8

Code:

  fsqrt v0.2s, v8.2s
  fsqrt v1.2s, v8.2s
  fsqrt v2.2s, v8.2s
  fsqrt v3.2s, v8.2s
  fsqrt v4.2s, v8.2s
  fsqrt v5.2s, v8.2s
  fsqrt v6.2s, v8.2s
  fsqrt v7.2s, v8.2s
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03070a0b18191e1f3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696b6d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~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)9fa8acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204160045119911000390617993725801001008000010080000500567798401600260160045160045149928614999980100200800082008000816004516004511802011009910010080000100000111511721611159983080000100160046160046160046160046160046
802041600451198110000014417993725801001008000010080000500567798411600260160045160045149895614999980100200800082008000816004516004511802011009910010080000100000111511711611159983080000100160046160046160046160046160046
8020416004511991100000617993725801001008000010080000500567798401600260160045160045149895614999980100200800082008000816004516004511802011009910010080000100000111511711611159983180000100160046160046160046160046160046
80204160045119911000007267993725801001008000010080000500567798401600260160045160045149895614999980100200800082008000816004516004511802011009910010080000100000111511711621160052080000100160046160046160046160046160046
8020416004511991100090617993725801001008000010080000500567798401600260160045160045149895614999980100200800082008000816004516004511802011009910010080000100000111511721611159983080000100160046160046160046160046160046
80204160045119911000630617993725801001008000010080000500567798411600263160045160045149895614999980100200800082008000816004516004511802011009910010080000100000111511711611159983080000100160046160046160046160046160046
8020416004511981100000617993725801001008000010080000500567809701600260160045160045149928614999980100200800082008000816004516004511802011009910010080000100000111511711611159983080000100160046160046160046160046160046
802041600451199110000061799372580100100800001008000050056779840160026016004516004514989561499998010020080008200800081600451600451180201100991001008000010001890111511711611159983080000100160046160046160046160046160046
8020416004511991100000617993742801001008000010080000500567798401600260160045160045149895614999980100200800082008000816004516004511802011009910010080000100000111511711611159983080000100160046160046160046160046160046
8020416004511991100000617993725801001008000010080000500567798401600260160045160045149895614999980100200800082008000816004516004511802011009910010080000100000111511711611159983080000100160046160046160046160046160046

1000 unrolls and 10 iterations

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

retire (01)cycle (02)031e1f3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)6061696b6d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~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)9fa8acc2cfd0d2icache miss (d3)d5d6dadbddinst fetch restart (de)e0? int output thing (e9)eaebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
800241600451198006179937258001010800001080000505677984101600260160045160045149910315002580010208007620800001600451600451180021109101080000100005020000111600121215997200008000010160046160046160046160046160046
80024160045119900617993725800101080000108000050567798400160026016004516004514991031500258001020800002080000160045160045118002210910108000010000502000013160012815997200008000010160046160046160046160046160046
800241600451199006179937258001010800001080000505677984101600260160045160045149910315002580010208000020800001600451600451180021109101080000100005020000121600111215997200008000010160046160046160046160101160046
8002416004511990025179937258001010800001080000505677984101600260160045160045149960315002580010208000020800001600451600451180021109101080000100005020000121600121515997200008000010160101160046160046160046160046
800241600451199006179937258001010800001080000505677984001600260160045160045149910315002580010208000020800001600451600451180021109101080000101005037000131600141115997200008000010160046160046160046160046160046
8002416004511980072679937258001010800001080000505677984001600260160045160045149910315002580010208000020800001600451600451180021109101080000100005020000125800121315997200008000010160046160046160046160046160046
800241600451199006179937258001010800001080000505677984101600260160045160045149910315002580010208000020800001600451600451180021109101080000100005020000131600111415997200008000010160046160046160046160046160046
800241600451199006179937258001010800001080000505677984001600260160045160045149910315002580010208000020800001600451600451180021109101080000100005020000121600111115997200098000010160046160046160101160046160046
8002416004511990061799372580010108000010800005056779840016002601600451600451499103150025800102080000208000016004516004511800211091010800001001890502000012160081315997200008000010160046160046160046160046160046
800241600451198006179937258001010800001080000505677984001600260160045160045149910315002580010208000020800001600451600451180021109101080000100005085000111600131115997200008000010160046160046160046160046160046