Apple M1 Microarchitecture Research by Dougall Johnson

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

ORR (vector, immediate, 4H)

Test 1: uops

Code:

  orr v0.4h, #1
  movi v0.16b, 1

(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)031e3f4e51inst 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
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000373116111786100020382038203820382038
10042037160611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110001073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038

Test 2: Latency 1->1

Code:

  orr v0.4h, #1
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)030b1e3a3f4e51inst 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)6061696d6edispatch 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)9fa0a8acc2c5branch mispredict (cb)cdcfd0d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020420037150000686196862510100100100001001000050028475210020018200372003718428618740101002001000820010008200372003711102011009910010010000100000011171700160019801100001002003820038200382003820038
102042003715010061196862510100100100121041000050028475210020018200372003718428618733101002041000820010008200372003711102011009910010010000100000011171800160019801100001002003820038200382003820038
10204200371500301042196862510100100100001041000050028475210520018200372003718428618741101002001000820010008200372003711102011009910010010000100000011171850160019800100001002003820038200382003820038
1020420037150000726196862510100100100001001000050028475211020018200372003718428718741101002001000820010008200372003711102011009910010010000100000011171850160019800100001002003820038200382003820038
102042003715000061196862510100100100001001000050028475211020018200372003718428718741101002001000820010008200372003711102011009910010010000100000011171700160019800100001002003820038200382003820038
10204200371500001031968625101001001000010010000500284752110200182003720084184281418759101002001000820010008200852003711102011009910010010000100203211174300320019800100001002003820038200382008620038
102042003715000061196862510100100100001001000050028475211020018200372003718428618741101002001000820010008200372003711102011009910010010000100000011171800160019800100001002003820038200382003820038
102042003715000061196862510100100100001001000050028475210520018200372003718428718740101002001000820010008200372003711102011009910010010000100000011171700160019800100001002003820038200382003820038
1020420037150018061196862510100100100001001000050028475210520018200372003718428718741101002001000820010008200372003711102011009910010010000100010011171850160019800100001002003820038200382003820038
102042003715000061196862510100100100001001000050028475210520018200372003718439718795101002001000820010008200372003711102011009910010010000100010011171750160019800100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.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)9fa0a1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002420037150000000061196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000000006402162219786010000102003820038200382003820038
1002420037150000000061196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000000006402162219786010000102003820038200382003820038
10024200371500000000147196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000000006402162219786010000102003820038200382003820038
1002420037150000000061196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000000006692162219786010000102003820038200382003820038
1002420037150000000061196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000000006402162219786010000102003820038200382003820038
1002420037150000000061196862510010101000010100005028475210200182003720037184433187671001020100002010000200372003711100211091010100001000000006402162219786010000102003820038200382003820038
1002420037150000000061196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000000006402162219786010000102003820038200382003820038
1002420037150000000061196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000000006402162219786010000102003820038200382003820038
1002420037150000000061196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000000006402162219786010000102003820038200382003820038
1002420037150000000061196862510010101000010100005028475210200182003720037184433187671001020100002010000200372003711100211091010100001000000006402162219786010000102003820038200382003820038

Test 3: throughput

Count: 8

Code:

  movi v0.16b, 0
  orr v0.4h, #1
  movi v1.16b, 0
  orr v1.4h, #1
  movi v2.16b, 0
  orr v2.4h, #1
  movi v3.16b, 0
  orr v3.4h, #1
  movi v4.16b, 0
  orr v4.4h, #1
  movi v5.16b, 0
  orr v5.4h, #1
  movi v6.16b, 0
  orr v6.4h, #1
  movi v7.16b, 0
  orr v7.4h, #1

(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)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)9fa8a9c2cfd5d6daddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020420088150330382580100100800001008000050064000012004420063200633218010020080000200800002006320132111602011009910010016000010000010111116011200601600001002006420064200642006420064
16020420063150351382580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010000010111116011200601600001002006420064200642006420064
160204200631500582580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010000010111116011200601600001002006420064200642006420064
1602042006315027382580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010000010111116011200601600001002006420064200642006420064
160204200631500382580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010000010111116011200601600001002006420064200642006420064
160204200631500382580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010000010111116011200601600001002006420064200642006420064
16020420063150369382580100100800001008000050064000012004420063200633218010020080000200800002006320063211602011009910010016000010000010111116011200601600001002006420064200642006420064
160204200631510382580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010000010113116011200601600001002006420064200642006420064
160204200631500382580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010000010111116011200601600001002006420064200642006420064
16020420063150420382580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010000010111116011200601600001002006420064200642006420064

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030b18191e1f3a3f51inst 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)5f6061696b6d6escheduler 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)e0? int output thing (e9)eaec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024200821500003600044278001212800001280000626400001152003102005020050321800122080000208000020059200591116002110910101600001000000010029116233442223200562402160000102006020051200602006020060
1600242005915000000050298001212800001280000626400000152004002005920059321800122080000208000020059200591116002110910101600001000000010029116223442233200562402160000102006020060200602006020060
160024200591500002490050298001212800001280000626400000152004002005920059321800122080000208000020059200591116002110910101600001000000010029116233442232200562402160000102006020060200602006020060
160024200591500002820050298001212800001280000626400000152004002005920059321800122080000208000020059200591116002110910101600001000000010028116233442223200562402160000102006020060200602006020060
1600242005915000000050298001212800001280000626400000152004002005920059321800122080000208000020059200591116002110910101600001000000010029116233442233200562402160000102006020060200602006020060
160024200591500003690050298001212800001280000626400000152004002005920059321800122080000208000020059200591116002110910101600001000000010029116223442232200562402160000102006020060200602006020060
160024200591500003120050298001212800001280000626400000152004002005920059321800122080000208000020059200591116002110910101600001000000010028116233442243200562402160000102006020060200602006020060
160024200591500000006029800121280000128000062640000015200400200592005932180012208000020800002005920050111600211091010160000100000001002882233442233200472402160000102005120060200602005120060
1600242005015000000050298001212800001280000626400000152004002005920059321800122080000208000020059200591116002110910101600001000000010029116233442232200472402160000102005120060200512006020051
160024200501500003720050298001212800001280000626400000052003102005920059321800122080000208000020059200591116002110910101600001000000010029112233441233200562201160000102006020051200602006020060

Test 4: throughput

Count: 16

Code:

  orr v0.4h, #1
  orr v1.4h, #1
  orr v2.4h, #1
  orr v3.4h, #1
  orr v4.4h, #1
  orr v5.4h, #1
  orr v6.4h, #1
  orr v7.4h, #1
  orr v8.4h, #1
  orr v9.4h, #1
  orr v10.4h, #1
  orr v11.4h, #1
  orr v12.4h, #1
  orr v13.4h, #1
  orr v14.4h, #1
  orr v15.4h, #1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03080a1e3f51inst 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)9fcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400493000004025160100100160000100160000500112001604001904003840088199730319996160100200160000200160000400384003811160201100991001001600001001011051635400351600001004003940039400394003940039
1602044003830000013525160100100160000100160000500112001604001904003840038199730319996160100200160000200160000400384003811160201100991001001600001001011051655400351600001004003940039400394003940039
160204400382990004025160100100160000100160000500112001604001904003840038199730319996160100200160000200160000400384003811160201100991001001600001001011051655400351600001004003940039400394003940039
160204400382990004025160100100160000100160000500112001604001904003840038199730319996160100200160000200160000400384003811160201100991001001600001001011031655400351600001004008740039400394003940039
160204400383000004025160100100160000100160000500112001604001904003840038199730319996160100200160000200160000400384003811160201100991001001600001001011051655400351600001004003940039400394003940039
160204400382990004025160100100160000100160000500112001604001904003840038199730319996160100200160000200160000400384003811160201100991001001600001001011051655400351600001004003940039400394003940039
160204400382990004025160100100160000100160000500112001604001904003840038199730319996160100200160000200160000400384003811160201100991001001600001001011051653400351600001004003940039400394003940039
160204400383000004025160100100160000100160000500112001614001904003840038199730319996160100200160000200160000400384003811160201100991001001600001001011051655400351600001004003940039400394003940039
160204400383000004025160100100160000100160000500112001614001904003840038199730319996160100200160000200160000400384003811160201100991001001600001001011051655400351600001004003940039400394003940039
160204400382990004025160100100160000100160000500112001614001904003840038199730319996160100200160000200160000400384003811160201100991001001600001001011051655400351600001004003940039400394003940039

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03090b181e3f51inst 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)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)9fa0a1a8acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024400393000009452516001010160000101600006011200161154001940038400381999632001816001020160000201600004003840038111600211091010160000100000010024113271642167400350208160000104003940039400394003940039
1600244003830000012452516001010160000101600966011200161154001940038400381999632001816001020160000201600004003840038111600211091010160000100019010022821616211764003504016160000104003940039400394003940039
16002440038300000045251600101016000010160000601120016215400194003840038199963200181600102016000020160000400384003811160021109101016000010000001002282181621169400350208160000104003940039400394003940039
16002440038299000045251600101016000010160000601120016015400194003840038199963200181600102016000020160000400384003811160021109101016000010000001002282171621177400350208160000104003940039400394003940039
160024400383000000454416010410160000101600006011200161154001940038400381999632001816001020160000201600004003840089111600211091010160000100000010022821716212674003502016160000104003940039400394003940039
16002440038300000045251600101016000010160000601120016215400194003840038199963200181600102016000020160000400384003811160021109101016000010421001002282181621158400350208160000104003940039400394003940039
160024400383000000452516001010160000101600006011200162154001940038400381999632001816001020160000201600004003840038111600211091010160000100000010024113261642166400350208160000104003940039400394003940039
16002440038299000021525160010101600001016000060112001611540019400384003819996320018160010201600002016000040038400381116002110910101600001000200100241131716212784003502016160000104003940039400394003940039
160024400383000000452516001010160000101600006011200161154001940038400381999632001816001020160000201600004003840038111600211091010160000100000010022821616222664003504016160000104003940039400394003940039
16002440038300000045251600101016000010160000601120016115400194003840038199963200181600102016000020160000400384003811160021109101016000010000001002282181632169400350208160000104003940039400394003940039