Apple M1 Microarchitecture Research by Dougall Johnson

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

BIC (vector, immediate, 2S)

Test 1: uops

Code:

  bic v0.2s, #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)6061696d6edispatch 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)a8accfd0d2d5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100420371536116862510001000100026452100201820372037157131895100010001000203720371110011000007300116111786100020382038203820382038
100420371506116862510001000100026452100201820372037157131895100010001000203720371110011000007300116111786100020382038203820382038
1004203715061168625100010001000264521002018203720371571318951000100010002037203711100110001707300116111786100020382038203820382038
100420371536116862510001000100026452100201820372037157131895100010001000203720371110011000007300116111786100020382038203820382038
100420371506116862510001000100026452100201820372037157131895100010001000203720371110011000007300116111786100020382038203820382038
100420371606116862510001000100026452100201820372037157131895100010001000203720371110011000007300116111786100020382038203820382038
1004203715010316862510001000100026452100201820372037157131895100010001000203720371110011000007300116111786100020382038203820382038
1004203716216116862510001000100026452100201820372037157131895100010001000203720371110011000007300116111786100020382038203820382038
100420371506116862510001000100026452100201820372037157131895100010001000203720371110011000007300116111786100020382038203820382038
100420371506116862510001000100026452100201820372037157131895100010001000203720371110011000007300116111786100020382038203820382038

Test 2: Latency 1->1

Code:

  bic v0.2s, #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)03083a3f4e51inst 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)9fa8a9acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204200371500061196862510100100100001001000050028475211200182003720037184286187401010020010008200100082003720037111020110099100100100001000001117170160019800100001002003820038200382003820038
10204200371500061196862510100100100001001000050028475210200182003720037184287187401010020010008200100082003720037111020110099100100100001000001117170160019801100001002003820038200382003820038
10204200371500061196862510100100100001001000050028475210200182003720037184286187411010020010008200100082003720037111020110099100100100001000001117170160019800100001002003820038200382003820038
10204200371500061196862510100100100001001000050028475210200182003720037184286187411010020010008200100082003720037111020110099100100100001000001117180160019801100001002018220038200382003820038
10204200371500061196862510100100100001001000050028475211200182003720037184287187411010020010008200100082003720037111020110099100100100001005001117170160019800100001002003820038200382003820038
10204200371500061196862510100100100001001000050028475210200182003720037184287187411010020010008200100082003720037111020110099100100100001004201681117170160019801100001002003820038200382003820038
102042003715000611968625101001001000010010000500284752102001820037200371842861874010100200100082001000820037200371110201100991001001000010050031117170160019801100001002003820038200382003820038
102042003714900611968625101001001000010010000500284752102001820037200371842871874010100200100082001000820037200371110201100991001001000010000331117180160019801100001002003820038200382003820038
102042003715000611968625101001001000010010000500284752112001820037200371842861874010100200100082001000820037200371110201100991001001000010000811117170160019800100001002003820038200382003820038
10204200371501061196862510100100100001001000050028475211200182003720037184286187411010020010008200100082003720037111020110099100100100001000001117170160019801100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)0304080b18191e1f3a3f4e51inst 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)9fa0a1a6a7a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002420037150000000004831968625100101010000101000050284752102001820037200371844331876710010201000020100002003720037111002110910101000010000000006404164319786010000102003820038200382003820038
100242003715000000000821968625100101010000101000050284752112001820037200371844331876710010201000020100002003720037111002110910101000010000000006404164419786010000102003820038200382003820038
10024200371500000000061196862510010101000010100005028475210200182003720037184433187671001020100002010000200372003711100211091010100001000001807206403163419786010000102003820038200382003820038
1002420037150000000006411968625100101010000101000050284752102001820037200371844331876710010201000020100002003720037111002110910101000010000000006404164419786010000102003820038200382003820038
100242003715000000000611968625100101010000101000050284752102001820037200371844331876710010201000020100002003720037111002110910101000010000000006404164319786010000102003820038200382003820038
100242003715000000000611968625100101010000101000050284752102001820037200371844331876710010201000020100002003720037111002110910101000010000000006404164319786010000102003820038200382003820038
100242003715000000000661968625100101010000101000050284752102001820037200371844331876710010201000020100002003720037111002110910101000010000000006404163219786010000102003820038200382003820038
1002420037150000000001871968625100101010000101000050284752102001820037200371844331876710010201000020100002003720037111002110910101000010000000006403163419786010000102003820038200382003820038
1002420037150000000002351968625100101010000101000050284752102001820037200371844331876710010201000020100002003720037111002110910101000010000000006404164519786010000102003820038200382003820038
100242003715000000000611968625100101010000101000050284752102001820037200371844331876710010201000020100002003720037111002110910101000010000000006404163419786010000102003820038200382003820038

Test 3: throughput

Count: 8

Code:

  movi v0.16b, 0
  bic v0.2s, #1
  movi v1.16b, 0
  bic v1.2s, #1
  movi v2.16b, 0
  bic v2.2s, #1
  movi v3.16b, 0
  bic v3.2s, #1
  movi v4.16b, 0
  bic v4.2s, #1
  movi v5.16b, 0
  bic v5.2s, #1
  movi v6.16b, 0
  bic v6.2s, #1
  movi v7.16b, 0
  bic v7.2s, #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)030b1e3f51inst 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)9fa8a9accfd5d6ddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020420090150096232580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010000010111116112006001600001002006420064200642006420064
16020420063152003232580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010000010111116112006001600001002006420064200642006420064
1602042006315000382580100100800001008000050064000002004420063200633218010020080000200800002006320063111602011009910010016000010000010111116112006001600001002006420064200642006420064
1602042006315000382580100100800001008000050064000002004420063200633218010020080000200800002006320063111602011009910010016000010000010111116112006001600001002006420064200642006420064
16020420063150002042580100100800001008000050064000002004420063200633218010020080000200800002006320063111602011009910010016000010010010111116112006001600001002006420064200642006420064
1602042006315000382580100100800001008000050064000002004420063200633218010020080000200800002006320063111602011009910010016000010000010111116112006001600001002006420064200642006420064
1602042006315000382580100100800001008000050064000002004420063200633408010020080000200800002006320063111602011009910010016000010010010111116112006001600001002006420064200642006420064
1602042006315000382580100100800001008000050064000012004420063200633218010020080000200800002006320063111602011009910010016000010010010111116112006001600001002006420064200642006420064
1602042006315000382580100100800001008000050064000002004420063200633218010020080000200800002006320063111602011009910010016000010000010111116112006001600001002006420064200642006420064
16020420063150043210752580100100800001008000050064000002004420063200633218010020080000200800002006320063111602011009910010016000010000010111116112006001600001002006420064200642006420064

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03081e1f3f51inst 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)9fa6a7a8accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)eaebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600242016215010104442780012128000012800006264000011020031200502005032180012208000020800002005020050111600211091010160000100000100348118252119102004722001160000102005120051200512005120051
16002420050150000172278001212800001280000626400001152003120050200503218001220800002080000200502005011160021109101016000010000010035111292541212112004724101160000102006220062200602006020060
1600242006115001201182780012128000012800006264000001520031200502005932180012208000020800002005920059111600211091010160000100003100351112113441210102004722002160000102006220060200602005120060
1600242005915002730501138001212800001280000626400000152004020138200599608001220801942080100201292006111160021109101016000010000010032112193422210122005624002160000102006220051200602006020062
160024200611500004429800121280000128012562640000015200312005020059321800122080000208000020050200611116002110910101600001000001003411221125222982005622002160000102006020060200512006020060
1600242006115001204429800121280000128000062640000015200402005920059321800122080000208000020059200591116002110910101600001000031003511221234222992005622001160000102006020051200512006020060
16002420059150000502980012128000012800006264000011520040200502006132180012208000020800002005920050111600211091010160000100000100351112103442210112004724001160000102006220051200622006020062
1600242005915000033627800121280000128000062640000015200402005920059321800122080000208000020059200501116002110910101600001000001003711121125222992004724002160000102006020060200512006020060
1600242005015100050298001212800001280000626400000152004020061200503218001220800002080000200502005911160021109101016000010000010037822122522112112005624002160000102006220062200602006020051
160024200501500005029800121280000128000062640000015200312005920050321800122080000208000020059200501116002110910101600001000001003481293432210102005624102160000102006220060200602005120060

Test 4: throughput

Count: 16

Code:

  bic v0.2s, #1
  bic v1.2s, #1
  bic v2.2s, #1
  bic v3.2s, #1
  bic v4.2s, #1
  bic v5.2s, #1
  bic v6.2s, #1
  bic v7.2s, #1
  bic v8.2s, #1
  bic v9.2s, #1
  bic v10.2s, #1
  bic v11.2s, #1
  bic v12.2s, #1
  bic v13.2s, #1
  bic v14.2s, #1
  bic v15.2s, #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)030b191e1f3a3f51inst 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)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)9fa8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400383000000021025160100100160000100160000500112001604001940038400381997303199961601002001600002001600004003840038111602011009910010016000010000010110216224003501600001004003940039400394003940039
160204400383000000025625160100100160000100160000500112001604001940038400381997303199961601002001600002001600004003840038111602011009910010016000010000010110216224003501600001004003940039400394003940039
160204400383000000021425160100100160000100160000500112001604001940038400381997303199961601002001600002001600004003840038111602011009910010016000010000010110216224003501600001004003940039400394003940039
160204400383000000030825160100100160000100160000500112001614001940038400381997303199961601002001600002001600004003840038111602011009910010016000010000010110216224003501600001004003940039400394003940039
16020440038300000004025160100100160000100160000500112001604001940038400381997303199961601002001600002001600004003840038111602011009910010016000010000010110216224003501600001004003940039400394003940039
160204400383000000066925160100100160000100160000500112001614001940038400381997303199961601002001600002001600004003840038111602011009910010016000010000010110216224003501600001004003940039400394003940039
1602044003830000120049325160100100160000100160000500112001604001940038400381997303199961601002001600002001600004003840038111602011009910010016000010000010110216224003501600001004003940039400394003940039
160204400383000000043925160100100160000100160000500112001614001940038400381997303199961601002001600002001600004003840038111602011009910010016000010000010110216224003501600001004003940039400394003940039
160204400383000000022925160100100160000100160000500112001614001940038400381997303199961601002001600002001600004003840038111602011009910010016000010000010110216224003501600001004003940039400394003940039
160204400383000000054425160100100160000100160000500112001614001940038400381997303199961601002001600002001600004003840038111602011009910010016000010000010110216224003501600001004003940039400394003940039

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03070a0b18191e1f3a3f51inst 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)5f6061696b6d6edispatch 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)9fa0a1a6a8a9acc2cdcfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024400393000000000192725160010101600001016000050112001611540019040038400381999603200181600102016000020160000400384003811160021109101016000010000000001007683112162111215400352016160000104003940039400394003940039
160024400383000000000045251600101016000010160000501120016015400190400384003819996032001816001020160000201600004003840038111600211091010160000100000000010075831121621191340035208160000104003940039400394003940039
1600244003830001000000552516001010160000101600005011200161154001934003840038199960320018160010201600002016000040038400381116002110910101600001000000000100801132171641191540035208160000104003940039400394003940039
1600244003829900000000452516001010160000101600005011200161154001904003840038199960320018160010201600002016000040038400381116002110910101600001000000000100908211516211141440035208160000104003940039400394003940039
16002440038300000000004525160010101600001016000050112001611540019040038400381999603200181600102016000020160000400384003811160021109101016000010000000001007311211416211141640035208160000104003940039400394003940039
160024400383000000000045251600101016000010160000501120016115400190400384003819996032001816001020160000201600004003840038111600211091010160000100000000010075822816211161340035208160000104003940039400394003940039
16002440088300000000007102516001010160000101600005011200161154001904003840038199960320018160010201600002016000040038400381116002110910101600001000000000100758321516211131540035208160000104003940039400394003940039
16002440038300000000004525160010101600001016000050112001611540019040038400381999603200181600102016000020160000400384003811160021109101016000010000000001007511211416211111440035208160000104003940039400394003940039
16002440038299000000004525160010101600001016000050112001611540019040038400381999603200181600102016000020160000400384003811160021109101016000010000000001007711311016211141340035208160000104003940039400394003940039
1600244003830000000000452516001010160000101600005011200161154001904003840038199960320018160010201600002016000040038400381116002110910101600001000000001100748211516211151340035208160000104003940039400394003940039