Apple M1 Microarchitecture Research by Dougall Johnson

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

URSRA (vector, 2D)

Test 1: uops

Code:

  ursra v0.2d, v1.2d, #3
  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)03071e3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)60696d6edispatch 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)a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037230061254825100010001000398313030183037303724153289510001000200030373037111001100010073216222630100030383038303830383038
10043037220061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037230061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037230061254825100010001000398313030183037303724153289510001168200030373037111001100000073216222630100030383038303830383038
10043037230061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037230061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037220061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037220061254825100010001000398313030183037303724153289510001000200030373037111001100000373216222630100030383038303830383038
10043037220061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037220061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038

Test 2: Latency 1->1

Code:

  ursra v0.2d, v1.2d, #3
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0308191e3f4e51inst 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)9fa8a9accdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225000612954825101481001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007102161129634100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010050007101161129634100001003003830038300383003830038
1020430037224000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
1020430037225020612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010020007101161129634100001003003830038300383003830038
1020430037225000612954825101001311000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010010007101161129634100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731313001830037300802826532874510100200100002002000030037300371110201100991001001000010030007101161129634100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010010007101161129634100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010010007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03080b18191e1f3f4e51inst 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)696d6edispatch 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)9fa8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024306522371113131335114427829548251001010100001010000504277313300183003730037282873287671060720100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
10024300372250000006129548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001010006402162229630010000103003830038300383003830038
10024300372250000008229548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001010006402162529630010000103003830038300383003830038
100243003722500000085429548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001020006402162429630010000103003830038300383003830038
10024300372250000006129548251004410100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
10024300372250000006129548251001010100001010000504277313300183003730037282873287671001020100002021314300373003711100211091010100001030006402162229630010000103003830038300383003830038
10024300372240004006129548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
10024300372240000006129548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001010006402162229630010000103003830038300383003830038
100243003722500002106129548251001010100001010000504277313300183003730037282873287671001020100002220000300373003711100211091010100001050006402162229630310000103003830038300383003830038
100243003722500000061295481021001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001010006402162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  ursra v0.2d, v0.2d, #3
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e3a3f4e51inst 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)696d6edispatch 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)9fa0a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225009729547251010010010000100100005004277160300183003730037282526287331010020010000200200003003730037111020110099100100100001000031117222242229629100001003003830038300383003830038
10204300372251209729547251010010010000100100005004277160300183003730037282526287331010020010000200200003003730037111020110099100100100001000001117222242229629100001003003830229300383003830038
1020430084225009729547251010010010000100100005004277160300183003730037282526287331010020010000200200003003730037111020110099100100100001000001117222242229629100001003003830038300383003830038
1020430037225009729547251010010010000100100005004277160300183003730037282526287331010020010000200200003003730037111020110099100100100001000001117222242229629100001003003830038300383003830038
1020430037225019729547251010010010000100100005004277160300183003730037282526287331010020010000200200003003730037111020110099100100100001000001117222242229629100001003003830038300383003830038
1020430037224019729547251010010010000100100005004277160300183003730037282526287331010020010000200200003003730037111020110099100100100001000001117222242229629100001003003830038300383003830038
1020430037225019729547251010010010000100100005004277160300183003730037282526287331010020010000200200003003730037111020110099100100100001000001117222242229629100001003003830038300383003830038
1020430037225019729547251010010010000100100005004277160300183003730037282526287331010020010000200200003003730037111020110099100100100001000001117222242229629100001003003830038300383003830038
10204300372250197295472510100100100001001000050042771603001830037300372825262873310100200100002002000030037300371110201100991001001000010000481117222242229629100001003003830038300383003830038
1020430037225019729547251010010010000100100005004277160300183003730037282526287331010020010000200200003003730037111020110099100100100001000001117222242229629100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e3f4e51inst 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)9fa0a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612951125100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830083
10024300372259612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010400640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  ursra v0.2d, v8.2d, #3
  movi v1.16b, 0
  ursra v1.2d, v8.2d, #3
  movi v2.16b, 0
  ursra v2.2d, v8.2d, #3
  movi v3.16b, 0
  ursra v3.2d, v8.2d, #3
  movi v4.16b, 0
  ursra v4.2d, v8.2d, #3
  movi v5.16b, 0
  ursra v5.2d, v8.2d, #3
  movi v6.16b, 0
  ursra v6.2d, v8.2d, #3
  movi v7.16b, 0
  ursra v7.2d, v8.2d, #3
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03070a1e3f51inst 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)60696d6escheduler 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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602042009115011029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011951611200621600001002006620066200662006620066
16020420065151110292580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000151111011911611200621600001002006620066200662006620066
1602042006515011029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011911611200621600001002006620066200662006620066
1602042006515011029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011911611200621600001002006620066200662006620066
1602042006515111071258043310080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100101111011911611200621600001002006620066200662006620066
1602042006515011029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011911611200621600001002006620066200662006620066
1602042006515011029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011911611200621600001002006620066200662006620066
1602042006515011029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011911611200621600001002006620066200662006620066
16020420065150111529258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011911611200621600001002006620066200662006620066
1602042006515011029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100531111011911611200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03070a1e3a3f51inst 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)5f6061696d6escheduler 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)9fa8a9accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420066150120356258001010800001080000506400000110200312005020050322800102080000201600002005020050111600211091010160000100001004413212220221201720043015160000102005120047200472004720047
16002420046150110350258001010800001080000506400001110200272004620046322800102080000201600002004620046111600211091010160000100001004616612020222181920043030160000102005120047200472004720051
16002420046150000362258001010800001080000506400000110200272004620050322800102080000201600002005020046111600211091010160000100001004213611724211191620047015160000102005120047200472005120051
16002420050150110394258001010800001080000506400000110200312005020046322800102080000201600002004620050111600211091010160000100001004413611824212171620043015160000102005120047200512005120047
16002420050150120362258001010800001080000506400000110200312004620050322800102080000201600002005020050111600211091010160000100001004813711924421191920043030160000102004720051200512005120051
16002420050150110362258001010800001080000506400000110200272011720046322800102080000201600002005020050111600211091010160000100001004716621624422212020047030160000102005120051200512004720051
16002420050150110362258001010800001080000506400001110200272005020050322800102080000201600002004620050111600211091010160000100001004616611920412171720047030160000102005120051200512005120051
16002420050150000356258001010800001080000506400000110200272004620050322800102080000201600002005020050111600211091010160000100001003913721624421181720043015160000102004720047200472004720051
16002420046150110356888001010800001080000506400001110200272005020050322800102080000201600002004620046111600211091010160000100001004816711824221211920047030160000102004720051200512005120047
16002420050150120362258001010800001080000506400000110200312004620050322800102080000201600002004620046111600211091010160000100001004816722020422181920043015160000102005120051200512004720051

Test 5: throughput

Count: 16

Code:

  ursra v0.2d, v16.2d, #3
  ursra v1.2d, v16.2d, #3
  ursra v2.2d, v16.2d, #3
  ursra v3.2d, v16.2d, #3
  ursra v4.2d, v16.2d, #3
  ursra v5.2d, v16.2d, #3
  ursra v6.2d, v16.2d, #3
  ursra v7.2d, v16.2d, #3
  ursra v8.2d, v16.2d, #3
  ursra v9.2d, v16.2d, #3
  ursra v10.2d, v16.2d, #3
  ursra v11.2d, v16.2d, #3
  ursra v12.2d, v16.2d, #3
  ursra v13.2d, v16.2d, #3
  ursra v14.2d, v16.2d, #3
  ursra v15.2d, v16.2d, #3
  movi v16.16b, 17

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03191e3f51inst 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)9fa8acc3c5branch mispredict (cb)cdcfd6e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400603000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011816400361600001004004040040400404004040040
1602044003930000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010001201111011816400361600001004004040040400404004040040
160204400392990030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011816400361600001004004040040400404004040040
160204400393000030251601081001600081001600205001280788040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011816400361600001004004040040400404004040040
160204400393000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011816400361600001004004040040400404004040040
1602044003929900695251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011816400361600001004004040040400404004040040
160204400393000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011816400361600001004004040040400404004040040
160204400393000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011816400361600001004004040040400404004040040
160204400393000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001002001111011816401171600001004004040040400404004040040
160204400393000030431601081001601121001601245001281000040020400984003919977619990160120200160032200320064400394003911160201100991001001600001000001111011816400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080b18191e1f3f51inst 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)5f6061696d6edispatch 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)9fa0a1a6a8acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600244005129900000046251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000000010022821616211654003620121160000104004040040400404004040040
1600244003930100000073251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000030010022821616211564003620116160000104004040040400404004040040
1600244003930000000052251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000003010024822516411884003620106160000104004040040400404004040040
160024400393000000005225160010101600001016000050128000001540020400394003919996032001916001020160000203200004003940039111600211091010160000100000001002482181621175400362099160000104004040040400404004040040
1600244003929900000052251600101016000010160000501280000015400204003940039199960320019160010201600002032000040039400391116002110910101600001000000010022112151621155400362086160000104004040040400404004040040
1600244003929900000046251600101016000010160000501280000015400204003940039199960320019160010201600002032000040039400391116002110910101600001000000010024113181621288400362075160000104004040040400404004040040
16002440039300000000111251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000000010024113161641285400362082160000104004040040400404004040040
160024400393000000004625160010101600001016000050128000001540020400394003919996032001916001020160000203200004003940039111600211091010160000100000001002282151621156400362089160000104004040040400404004040040
160024400393000000004625160010101600001016000050128000011540020400394003919996032001916001020160000203200004003940039111600211091010160000100000001002282171621188400362083160000104004040040400404004040040
160024400393000000004625160010101600001016000050128000011540020400394003919996032001916001020160140203200004003940039111600211091010160000100001901002282171621175400362088160000104004040040400404004040040