Apple Microarchitecture Research by Dougall Johnson

M1/A14 P-core (Firestorm): Overview | Base Instructions | SIMD and FP Instructions
M1/A14 E-core (Icestorm):  Overview | Base Instructions | SIMD and FP Instructions

USQADD (scalar, S)

Test 1: uops

Code:

  usqadd s0, s1
  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 uop (01)cycle (02)031e3f4e51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map simd uop (7e)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd alu (9a)l1d cache writeback (a8)c3cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
1004303724198612548251000100010003983133018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037240612548251000100010003983133018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037240612548251000100010003983133018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037240612548251000100010003983133018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037240612548251000100010003983133018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037240612548251000100010003983133018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073216222630100030383038303830383038

Test 2: Latency 1->1

Code:

  usqadd s0, s1
  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 uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f404e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003723300000008902954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
102043003723200000008902954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
1020430037233000000010302954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000010371011611296940100001003003830038300383003830038
102043003723200000006102954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
10204300372330000000103029548251010010010000100100005004277313030018300373003728265328745101002001018220020000300373003711102011009910010010000100000101271011611296340100001003003830038300383003830038
1020430037232000012006102954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
102043003723300000006102954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000010071011611296340100001003003830038300383003830038
102043003723300220006102954825101001001000010010000500427731303001830037300372826532878010100200100002002000030037300371110201100991001001000010000000371011611296340100001003003830038300383003830038
1020430037233000015006102954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000040371011611296340100001003003830038300383003830038
102043003723300000006102954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)031e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)acc2cdcfl1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037232242292954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000064002162229630010000103003830038300383003830038
10024300772330612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000064002162229630010000103003830038300383003830085
10024300372330612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000064002162229630010000103003830038300383003830038
100243003723301032954825100101010000101000050427731313002230037300372828732876710010201000020200003003730037111002110910101000010000064002162229630010000103003830038300383003830038
10024300372326612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000064002162229630010000103003830038300383003830038
10024300372330612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000064002162229630010000103003830038300383003830038
10024300372320612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000064002162229630010000103003830038300383003830038
10024300372320612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000064002162229630010000103003830038300383003830038
10024300372320612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000064002162229630010000103003830038300383003830038
10024300372330612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000064002162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  usqadd s0, s0
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)031e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d cache writeback (a8)acatomic or exclusive succ (b3)c2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003723208229547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100000001117181629645100001003003830038300383003830038
102043003723206129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000001117181629646100001003003830038300383003830038
1020430037233020829547251010010010000100100005004277160030018300373003728271628740101002001000820020016300373003711102011009910010010000100000001117171629646100001003003830038300383003830038
1020430037233021129547251010010010000100100005004277160030018300373003728271628740101002001000820020016300373003711102011009910010010000100000001117171629646100001003003830072300383003830038
10204300372330175929547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100000001117181629645100001003003830038300383003830038
1020430037233015129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000001117171629646100001003003830038300383003830038
1020430037232072629547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000001117181629645100001003003830038300383003830038
1020430037232126129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000001117181629646100001003003830038300383003830038
1020430037233018729547251010010010000100100005004277160030018300373003728271628740101002001000820020016300373003711102011009910010010000100020001117171629646100001003003830038300383003830038
102043003723308229547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000001117171629645100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)simd prf full (72)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)91inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)accdcfd2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024300372320000001032954725100101010000101000050427716003001830037300372828603287671001020100002020000300373003711100211090101010000100000064002162229629010000103003830038300383003830038
1002430037233000000612954725100101010000101000050427716003001830037300372828603287671001020100002020000300373003711100211090101010000100000064002162229629010000103003830038300383003830038
1002430037233000000612954725100101010000101000050427716003001830037300372828603287671001020100002020000300373003711100211090101010000100000064002162229629010000103003830038300383003830038
1002430037233000000612954725100101010000101000050427716003001830037300372828603287671001020100002020000300373003711100211090101010000100000064002162229629010000103003830038300383003830038
1002430085233000000612954725100101010000101000050427716003001830037300372828603287671001020100002020000300373003711100211090101010000100003064002162229629010000103003830083300383003830038
1002430037233000000612954725100101010000101000050427716003001830037300372828603287671001020100002020000300373003711100211090101010000100000064023162229629010000103003830038300383003830038
10024300372330000001262954725100101010000101000050427716003001830037300372828603287671001020100002020000300373003711100211090101010000100000064002162229629010000103003830038300383003830038
1002430037233000000612954725100101010000101000050427716003001830037300372828603287671001020100002020000300373003711100211090101010000100000064002162229629010000103003830038300383003830038
1002430037233000000612954725100101010000101000050427716003001830037300372828603287671001020100002020000300373003711100211090101010000100000064002162229629010000103003830038300383003830038
1002430037232000000612954725100101010000101000050427716003001830037300372828603287671001020100002020000300373003711100211090101010000100000064002162229629010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  usqadd s0, s8
  movi v1.16b, 0
  usqadd s1, s8
  movi v2.16b, 0
  usqadd s2, s8
  movi v3.16b, 0
  usqadd s3, s8
  movi v4.16b, 0
  usqadd s4, s8
  movi v5.16b, 0
  usqadd s5, s8
  movi v6.16b, 0
  usqadd s6, s8
  movi v7.16b, 0
  usqadd s7, s8
  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 uop (01)cycle (02)03l2 tlb miss data (0b)18191e1f3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)696d6emap rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb miss (a1)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204200881560000043258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651550000029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651550000029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651560000078258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000031111011916203861600001002006620066200662006620066
160204200651550000029258011610080016100800285006401962004520146200656128012820080028200160056200652006511160201100991001001600001000001111014316200621600001002006620066200662014820066
160204200651560000029258011610080016100800285006401962011820065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651550000071258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651560000029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
1602042006515500012029258011610080016100800285006401962004520065200656128022820080028200160056200652006511160201100991001001600001000101111011916200621600001002006620066200662006620066
160204200651560000071258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3a3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)5f6061696d6emap rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
1600242008715600200000145258001010800001080000506400001102002720046200463228001020800002016000020050200501116002110910101600001000010001003581172042271220047300160000102005120051200512005220051
16002420050156002000001512580010108000010800005064000000020031200512005032280010208000020160000200502005011160021109101016000010000000010035115212244229720047300160000102005120051200512005120051
16002420050155002000001511438043010804191080419506442240152031620448201313713180536208062820160930204502045661160021109101016000010020122183010174115211594226920379300160000102037320450204502045320456
16002420211159112155399440137382078063810801061080524506442320102031620446204514112980638208010520161260204772044961160021109101016000010000002955010154652824422121120048300160000102005120130200512004720051
16002420051156002100088115291438053510804191080210506425360152035620236202892486805192080315201610462037120375511600211091010160000104420014860100333119202119920109150160000102012820047200472004720289
160024200461590120271197352441661858084810807371080943506450401102018320664206913820981061208063020160842208522052911116002110910101600001020000296301031131183132119720706300160000102069620373208492037620852
16002420395167000000000244230480325108041810806315064588010020420207772090854127806382080630201608442068620591911600211091010160000102001002101573111328221191220043150160000102004720590208862085620859
16002420937167002010111320105614457306800101081152108125850645040010203582071820374741078043020810492016189420856206109116002110910101600001000010601003131172521111720048201160000102005220052200522005220052
160024200511550000000004527800101080000108000050640000110200322005120051322800102080000201600002005120051111600211091010160000100000000100323117252119920048201160000102005220052200522005220052
1600242005115500000000045278001010800001080000506400000102004120060200513228001020800002016000020051200601116002110910101600001000000001003231112254119620048201160000102005320052200522005320052

Test 5: throughput

Count: 16

Code:

  usqadd s0, s16
  usqadd s1, s16
  usqadd s2, s16
  usqadd s3, s16
  usqadd s4, s16
  usqadd s5, s16
  usqadd s6, s16
  usqadd s7, s16
  usqadd s8, s16
  usqadd s9, s16
  usqadd s10, s16
  usqadd s11, s16
  usqadd s12, s16
  usqadd s13, s16
  usqadd s14, s16
  usqadd s15, s16
  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 uop (01)cycle (02)03l2 tlb miss data (0b)18191e1f3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d5map dispatch bubble (d6)d9ddfetch restart (de)e0ea? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204400393100000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000001111011809160884003601600001004004040040400404004040040
160204400393100000031525160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100000001771111011803160884003601600001004004040040400404004040040
160204400393220000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000001111011803160884003601600001004004040040400404004040040
160204400393220000030251601081001600081001600205001280132040020400394003919977619990160120200160442200320064400394003911160201100991001001600001000000001111011837160784003601600001004004040040400404004040040
160204400393270000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000001111011807160734003601600001004004040040400404004040040
160204400393100000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000001111011807160894003601600001004004040040400404004040040
160204400393110000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000001111011803160674003601600001004004040040400404004040040
160204400393100000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000001111011808160884003601600001004004040040400404004040040
1602044003931100000582516010810016000810016002050012801320400204003940039199776199901601202001604382003200644003940039111602011009910010016000010000000011110118136160884003601600001004004040040400404004040040
160204400393100000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000001111011833160994003601600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3a3f5051schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)5f60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fst unit uop (a7)l1d cache writeback (a8)a9acb6cdcfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024400513100046025160010101600001016000050128000011400204003940039199963200191600102016000020320000400734003911160021109101016000010000000100223114162113440036155160000104004040040400404004040040
160024400393110052025160010101600001016000050128000011400204003940039199963200191600102016000020320000400664003911160021109101016000010000000100223113164124440036155160000104004040040400404004040040
1600244003931012035428481600101016000010160000501280000114002040039400391999632001916001020160000203200004010540039111600211091010160000100000001002231143521144400361510160000104004040040400404004040040
160024400393110046025160010101600001016000050128000001400204003940039199963200191600102016000020320000400654003911160021109101016000010000000100223113162113440036305160000104004040040400404004040040
160024400393110046025160010101600001016000050128000011400204003940039199963200191600102016000020320000400624003911160021109101016000010000000100246213162113440036155160000104004040040400404004040040
160024400393110052025160010101600001016000050128000011400204003940039199963200191600102016000020320000400684003911160021109101016000010000000100223123162114340036155160000104004040040400404004040040
1600244003931000432025160010101600001016000050128000011400204003940039199963200191600102016000020320000400604003911160021109101016000010000000100223114162113440036155160000104004040040400404004040040
160024400393100046025160010101600001016000050128000011400204003940039199963200191600102016000020320000401154003911160021109101016000010000000100396214162114440036155160000104004040040400404004040040
160024400393100052025160010101600001016000050128000001400204003940039199963200191600102016000020320000402604003911160021109101016000010000000100223114164113440036155160000104004040040400404004040040
1600244003931100460251600101016000010160000501280000114002040039400391999632001916001020160000203200004006440039111600211091010160000100000001002231131621144400361910160000104004040040400404004040040