[llvm-commits] [llvm] r55457 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/Target/TargetSelectionDAG.td lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86Instr64bit.td lib/Target/X86/X86InstrInfo.td

Duncan Sands baldrick at free.fr
Fri Aug 29 08:19:00 PDT 2008

> Not necessarily. The purpose of MemoryVT is to provide the type
> when it differs from what the load or store would normally have,
> in the case of an extending load or truncating store.

This occurs exactly when the type being loaded is not legal for
the target.  For example, suppose in the IR you load an i8, but
codegen on a target for which i8 is not legal (but i32 is).  This
gets turned into an extending load with MemoryVT equal to i8 and
result type equal to i32.  It seems quite similar to the situation
of doing an atomic operation on an i8 in the IR: it would get
legalized into an extending operation with MemoryVT equal to i8
and (assuming the operation returned an i8 value) returning an i32.



More information about the llvm-commits mailing list