[LLVMdev] Instruction MVT::ValueTypes

Evan Cheng evan.cheng at apple.com
Tue Sep 2 14:47:10 PDT 2008


On Sep 2, 2008, at 10:42 AM, David Greene wrote:

> Is there an easy way to get the MVT::ValueType of a MachineInstruction
> MachineOperand?  For example, the register operand of an x86 MOVAPD  
> should
> have an MVT::ValueType of v2f64.  A MOVAPS register operand should  
> have an
> MVT::ValueType of v4f32.

The short answer is no. A op of a number of different VTs can map to  
the same instruction. However, given a register class you can get to  
the list of VTs that map to it. Take a look at TargetRegisterDesc.

Evan

>
>
> So given a MachineInstruction and its MachineOperands is there some  
> easy way
> to derive this information?  I don't see anything in TargetInstrInfo  
> that
> would help.
>
>                                                 -Dave
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list