[X86][XOP] Tidyup VPHADD/VPHSUB unary horizontal ops default schedule class
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 3 Mar 2022 12:07:48 +0000 (12:07 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 3 Mar 2022 12:07:48 +0000 (12:07 +0000)
commit0c9c92ffc0acde32376b7ba8dcbe7fec90de3ff3
treed65b86befbdfe9f56735093135fa93ada24886c0
parenta8b4f5bbab62091835205f3d648902432a4a5b58
[X86][XOP] Tidyup VPHADD/VPHSUB unary horizontal ops default schedule class

Based off Agner and AMD SoG tables, the XOP VPHADD/VPHSUB unary horizontal ops are as fast as basic arithmetic ops, not the slower SSSE3 binary horizontal add/sub ops. This also matches what the bdver2 model already lists.

Noticed while investigating reduction add optimizations.
llvm/lib/Target/X86/X86InstrXOP.td
llvm/test/tools/llvm-mca/X86/Generic/resources-xop.s