Apple M1 Microarchitecture Research by Dougall Johnson

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

USRA (vector, D)

Test 1: uops

Code:

  usra d0, d1, #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)0307080b18191e1f3a3f4e5051inst 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)a0a1a6a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100430372300000000612548025100010001000398313030183037303724153289510001000200030373037111001100000030673316332630100030383038303830383038
1004303723000000006125480251000100010003983130301830373037241532895100010002000303730371110011000001005773316332630100030383038303830383038
1004303723000000006322548025100010001000398313030183037303724153289510001000200030373037111001100000000073316332630100030383038303830383038
100430372400000000612548025100010001000398313030183037303724153289510001000200030373037111001100000000073316332630100030383038303830383038
100430372300000000892548025100010001000398313030183037303724153289510001000200030373037111001100000000073316332630100030383038303830383038
1004303724000000002512548025100010001000398313030183037303724153289510001000200030373037111001100000000073316332630100030383038303830383038
100430372400000000842548025100010001000398313030183037303724153289510001000200030373037111001100000000073316332630100030383038303830383038
100430372400000000612548025100010001000398313030183037303724153289510001000200030373037111001100000000073316332630100030383038303830383038
100430372400000000612548025100010001000398313030183037303724153289510001000200030373037111001100000000073316332630100030383038303830383038
100430372400000000612548025100010001000398313030183037303724153289510001000200030373037111001100000000373316332630100030383038303830383038

Test 2: Latency 1->1

Code:

  usra d0, d1, #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)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)9fa8accdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003723212612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372330612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003723201072954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003723201032954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372330612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003723201172954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372320612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372330612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372330612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010010071011611296340100001003003830038300383003830038
10204300372330612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038

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)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)9fa0a1a7a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037233000000719295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000306402162229630010000103003830038300383003830038
100243003723200000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003723300000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000306402162229630010000103003830038300383003830038
100243003723200000061295482510010101000010100005042773130300183003730083282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003723200000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003723200000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003723300000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003723300009061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003723300000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003723200000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000010006402162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  usra d0, d0, #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)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)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)9fa0a1a6a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037233000000061295472510100100100001001000050042771601300180300373003728271628740101002001000820020016300373003711102011009910010010000100000003011171711600296460100001003003830038300383003830038
1020430037233000000061295472510100100100001001000050042771600300180300373003728271628741101002001000020020016300373003711102011009910010010000100000000011171701600296450100001003003830038300383003830038
1020430037232000000061295472510100100100001001000050042771600300180300373003728271628741101002001000820020016300373003711102011009910010010000100000000011171801600296460100001003003830038300383003830038
10204300372330000240061295472510100100100001001000050042771601300180300373008428271628741101002001000820020016300373003711102011009910010010000100000000011171701600296460100001003003830038300383003830038
1020430037233000000061295472510100100100001001000050042771601300180300373003728271628741101002001000820020016300373003711102011009910010010000100000000011171801600296450100001003003830038300383003830038
1020430037233000000061295472510100100100001001000050042771601300180300373003728271728740101002001000820020016300373003711102011009910010010000100000000011171801600296460100001003003830038300383003830038
10204300372330000420061295472510100100100001001000050042771600300180300373003728271628741101002001000820020016300373003711102011009910010010000100000000011171701600296450100001003003830038300383003830038
1020430037233000000061295472510100100100001001000050042771600300180300373003728271628740101002001000820020016300373003711102011009910010010000100000000011171701600296460100001003003830038300383003830038
1020430037241000000061295472510100100100001001000050042771601300180300373003728271728741101002001000820020016300373003711102011009910010010000100000000011171801600296450100001003003830038300383003830038
1020430037233000000061295472510100100100001001000050042771600300180300373003728271728741101002001000820020016300373003711102011009910010010000100000000011171801600296460100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030a181e3f4e51inst 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)9fa8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372320096684295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000006403165429629010000103003830038300383003830038
1002430037232003061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006405165529629010000103003830038300383003830038
1002430037233008161295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000006405165529629010000103003830038300383003830038
10024300372330015103295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006406165629629010000103003830038300383003830038
10024300372320024103295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006406166529629010000103003830038300853008630038
100243003723200061295382510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000006406166529629010000103003830038300383003830038
1002430037232000103295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006406166529629010000103003830038300383003830038
10024300372330043561295472510018101000810100005042798641300183013230133282913287671001020103242020648301333013321100211091010100001004539006407166429629010000103008530038300383003830038
1002430037233008161295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003721100211091010100001000006406165629629010000103003830038300383003830038
1002430037233003061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006405166529629010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  usra d0, d8, #3
  movi v1.16b, 0
  usra d1, d8, #3
  movi v2.16b, 0
  usra d2, d8, #3
  movi v3.16b, 0
  usra d3, d8, #3
  movi v4.16b, 0
  usra d4, d8, #3
  movi v5.16b, 0
  usra d5, d8, #3
  movi v6.16b, 0
  usra d6, d8, #3
  movi v7.16b, 0
  usra d7, d8, #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)031e3f51inst 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)60696b6d6escheduler 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)9fa8a9acc5branch mispredict (cb)cdcfd0d5d6d9ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602042006515502925801161008001610080028500640196020045020065200656128055120080028200160056200652006511160201100991001001600001005226111101190116000200621600001002006620066200662006620066
16020420065156029258011610480019100800315006402200200560200782007791280131200800312001600622007720077111602011009910010016000010000162222101310123011200751600001002007820079200792007920078
160204200771550652980119100800191008003150064022012005602007820077912801312008003120016006220077200781116020110099100100160000100006222101300123011200741600001002007820078200782007820078
160204200781560652980119100800191008003150064022012005602007820077912801312008003120016006220077200771116020110099100100160000100003222101300123011200741600001002007920079200782007820078
160204200781560653080119100800191008003150064022012005602007720077912801312008003120016006220078200771116020110099100100160000100000222101300123011200741600001002007820079200792007820078
160204200771560652980119100800191008003150064022002005602007820077912801312008003120016006220078200781116020110099100100160000100000222101310123011200751600001002007820078200782007820078
1602042007715515365298011910080019100800315006402201200560200782007791280131200800312001600622007720077411602011009910010016000010030002221013001232400200621600001002006620066200662006620066
1602042006515502925801161008001610080028500640196120045020065200656128012820080028200160056200652006511160201100991001001600001004400111101190016000200621600001002006620066200662006620066
1602042006515602925801161008001610080028500640196120045020065200656128012820080028200160056200652006511160201100991001001600001005003111101190016000200621600001002006620066200662006620066
1602042006515502925801161008001610080028500640196020045020065200656128012820080028200160056200652006511160201100991001001600001004700111101190016000200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03070a0b1e1f3a3f51inst 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)5f60696d6escheduler 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)9fa0a1a8a9acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420071155210000452780010108000010800005064000011200322005120051322800102080000201600002005120051111600211091010160000100000120100443212325422191920058402160000102006120061200612006120061
16002420060155110000598298001010800001080000506400000120041200602006032280010208000020160000200602006011160021109101016000010000000100466222234422181820058402160000102006320061200612006120062
160024200601610100009292980010108000010800005064000001200412006020060322800102080000201600002006020060111600211091010160000100400001004462217130422212020057402160000102006120061200612006120061
16002420060156110000932298001010800001080000506400000120041200602006032280010208000020160630200602006011160021109101016000010000000100456221734422191920057402160000102006120061200612006120061
1600242006015521000051298001010800001080000506400000120041200602006032280010208000020160000200602006011160021109101016000010000000100456222034422191820057402160000102006120061200612006120061
1600242006015621000051298001010800001080000506400000120041200602006032280010208000020160000200602006011160021109101016000010000000100406221834422161820057402160000102006120061200612006120061
1600242006015612000051298001010800001080000506400001120041200602006032280010208000020160416200602006011160021109101016000010000000100456221834422182020058402160000102006120061200612006120061
16002420051155110000235278001010800001080000506400000120041200602006032280010208000020160000200602006011160021109101016000010000030100403111925211191820048201160000102005220052200522005220052
1600242006015512000057298001010800001080000506400000120041200602006032280010208000020160634200602006011160021109101016000010000030100443222034422211920057402160000102006120061200612006120061
16002420060156210000572980010108000010800005064000001200412006020060310980010208000020160000200602006011160021109101016000010000090100426221734422201820057402160000102006120061200612006120061

Test 5: throughput

Count: 16

Code:

  usra d0, d16, #3
  usra d1, d16, #3
  usra d2, d16, #3
  usra d3, d16, #3
  usra d4, d16, #3
  usra d5, d16, #3
  usra d6, d16, #3
  usra d7, d16, #3
  usra d8, d16, #3
  usra d9, d16, #3
  usra d10, d16, #3
  usra d11, d16, #3
  usra d12, d16, #3
  usra d13, d16, #3
  usra d14, d16, #3
  usra d15, d16, #3
  movi v16.16b, 17

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)031e3f51inst 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)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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602044005830003025160108100160008100160020500128013240020400394003919986061999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013240020400394003919977061999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013240020400394003919977061999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013240020400394003919977061999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013240020400394003919977061999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013240020400394003919977061999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013240020400394003919977061999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013240020400394003919977061999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013240020400394003919977061999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400894004040040
1602044003930003025160108100160008100160020500128013240020400394003919977061999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0318191e1f3f51inst 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
160024400503110000462516001010160000101600005012800001104002040039400391999603200191600102016013820320000400394003911160021109101016000010000000100228112416411202040036155160000104004040040400404004040040
1600244003931000009872516001010160000101600005012800001054002040039400391999603200191600102016000020320000400394003911160021109101016000010000000100228112216212212040036155160000104004040040400404004040040
160024400393100000462516001010160000101600005012800001004002040039400391999603200191600102016000020320000400394003911160021109101016000010000000100228112016211212040036155160000104004040040400404004040040
160024400393100000462516010710160000101600005012800001154002040039400391999603200191600102016000020320000400394003911160021109101016000010000000100223412216211222240036155160000104004040040400404004040040
1600244003931000120462516001010160000101600005012800001004002040039400391999603200191600102016000020320000400394003911160021109101016000010000000100228112316211212140036155160000104004040040400404004040040
1600244003931000120462516001010160000101600005012800001104002040039400391999603200191600102016000020320000400394003911160021109101016000010000000100228412116211222140036155160000104004040040400404004040040
160024400393110000462516001010160000101600005012800001054002040039400391999603200191600102016000020320000400394003911160021109101016000010000000100223531516211212240036155160000104004040040400404004040040
160024400393110000462516001010160000101600005012800001104002040039400391999603200191600102016000020320000400394003911160021109101016000010000000100228412216211222240036155160000104004040040400404004040040
1600244003931000150462516001010160000101600005012800001154002040039400391999603200191600102016000020320000400394003911160021109101016000010000000100228412316211212340036155160000104004040040400404004040040
16002440039310006046251600101016000010160000501280000105400204003940039199960320019160010201600002032000040039400391116002110910101600001000001680100228412316211221440036155160000104004040040400404004040040