[PATCH] D147776: [llvm-exegesis][AArch64] Handle OPERAND_UNKNOWN

Pavel Kosov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 05:15:52 PDT 2023


kpdev42 added a comment.

In D147776#4286705 <https://reviews.llvm.org/D147776#4286705>, @courbet wrote:

> I wanted gchatelet@ to have a look at this, because he wrote the `Instruction`/`Operand` code. In particular, I'm wondering why we're not using the info on the actual `Operand` value rather than relying on the `MCOperandInfo` for the operand. Specifically, we do know that this is a register since we return true for `isReg`, so we could just bake this knowledge into `getExplicitOperandInfo` in a target-independant way.
>
> That being said, I don't know how the AArch64 backend is design, but it feels weird that the target info for that opearnd is `OPERAND_UNKNOWN` if we know that it's a register.

On aarch64 `OPERAND_UNKNOWN` can be register, shift, extend or noop. If it is register we simply pass it further for `randomizeMCOperand` to handle it accordingly. If it is immediate then we set it to noop for most ofvindtructions, except those excepting non zero shift value (MOVIv and friends). I am not familiar with other platforms so I'm not handling `OPERAND_UNKNOWN` for them at all (even when it is register). We have better randomization for aarch64 immediate, which can handle shift/extend which we plan to submit step by step if this one goes in.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147776/new/

https://reviews.llvm.org/D147776



More information about the llvm-commits mailing list