[llvm-exegesis] `ExegesisX86Target::setRegTo()`: support mask (K) regs
authorRoman Lebedev <lebedev.ri@gmail.com>
Sun, 11 Dec 2022 01:49:18 +0000 (04:49 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sun, 11 Dec 2022 02:03:00 +0000 (05:03 +0300)
commit6fb3c3a3cb72d932868a31f0a2139df9af292aa6
tree89fdc4342c5315a0b85b65479abedad6dcf9a359
parent13f489e75077a49aa3b44a369eeb1e1b3998691a
[llvm-exegesis] `ExegesisX86Target::setRegTo()`: support mask (K) regs

This only supports the obvious case, where the requested width
is supported by the available ISA sed, and there is
an appropriate, or wider, `KMOV?` instruction.

This doesn't deal with the 32/64 bit mask without BW instruction set.

This was the missing functionality that was
causing crashes in fd52305fdc7572534867247c8fb66093faf52e5c.
llvm/tools/llvm-exegesis/lib/X86/Target.cpp
llvm/unittests/tools/llvm-exegesis/X86/TargetTest.cpp