[PATCH] D138639: [X86] Add In64BitMode for MOVSX64/MOVZX64 instructions

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 21:51:57 PST 2022


skan added a comment.

In D138639#3950147 <https://reviews.llvm.org/D138639#3950147>, @craig.topper wrote:

> In D138639#3950146 <https://reviews.llvm.org/D138639#3950146>, @skan wrote:
>
>> In D138639#3950140 <https://reviews.llvm.org/D138639#3950140>, @craig.topper wrote:
>>
>>> In D138639#3950133 <https://reviews.llvm.org/D138639#3950133>, @HaohaiWen wrote:
>>>
>>>>> Is it not possible to use the encoding information in TSFlags rather than going through the assembly parser? Your patches for schedtool seem very coupled to the names of operand classes and other things. It looks like it will require updates often.
>>>>
>>>> The asm enumeration code and asm matcher patch as well as xed patch are used to build map between llvm opcode <-> Xed info <-> uops.info data / other scheduling info data source. Do you have any suggestion to build this map?
>>>> IsaSet in Xed info can also be used to identify whether a llvm opcode is supported by specific target. LLVM predicates can't determine that precisely.
>>>
>>> I don’t know anything about xed. What does it require?
>>>
>>>> Apart from that, I think we'd better fix wrong predicates.
>>>
>>> Be careful using the word “wrong”. The current implementation was intentional as it saves space in some generated tables.
>>
>> @craig.topper I'm not following. I also see that `mayLoad`, `mayStore` is omitted for x86 instructions with memory operands. And when the first operand is memory, the instructions is assumed to load/store, otherwise it's assumed to load only. Is it intentional or just for a slack off?
>
> Assumed where? In tablegen?

llvm/lib/CodeGen/TargetInstrInfo.cpp

  auto Flags = MachineMemOperand::MONone;
  for (unsigned OpIdx : Ops)
    Flags |= MI.getOperand(OpIdx).isDef() ? MachineMemOperand::MOStore
                                          : MachineMemOperand::MOLoad;

llvm/lib/Target/X86/X86InstrInfo.cpp

  if (I != nullptr) {
    unsigned Opcode = I->DstOp;
    bool FoldedLoad =
        isTwoAddrFold || (OpNum == 0 && I->Flags & TB_FOLDED_LOAD) || OpNum > 0;
    bool FoldedStore =
        isTwoAddrFold || (OpNum == 0 && I->Flags & TB_FOLDED_STORE);


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138639



More information about the llvm-commits mailing list