mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-03 18:37:56 +00:00
Add getTypeToExpandTo() which recursively walks TransformToType to determine
the intrinsic type to expand to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32558 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
45dc02d6f9
commit
975651ab98
@ -176,6 +176,26 @@ public:
|
||||
return TransformToType[VT];
|
||||
}
|
||||
|
||||
/// getTypeToExpandTo - For types supported by the target, this is an
|
||||
/// identity function. For types that must be expanded (i.e. integer types
|
||||
/// that are larger than the largest integer register or illegal floating
|
||||
/// point types), this returns the largest legal type it will be expanded to.
|
||||
MVT::ValueType getTypeToExpandTo(MVT::ValueType VT) const {
|
||||
while (true) {
|
||||
switch (getTypeAction(VT)) {
|
||||
case Legal:
|
||||
return VT;
|
||||
case Expand:
|
||||
VT = TransformToType[VT];
|
||||
break;
|
||||
default:
|
||||
assert(false && "Type is not legal nor is it to be expanded!");
|
||||
return VT;
|
||||
}
|
||||
}
|
||||
return VT;
|
||||
}
|
||||
|
||||
/// getPackedTypeBreakdown - Packed types are broken down into some number of
|
||||
/// legal first class types. For example, <8 x float> maps to 2 MVT::v4f32
|
||||
/// with Altivec or SSE1, or 8 promoted MVT::f64 values with the X86 FP stack.
|
||||
|
Loading…
x
Reference in New Issue
Block a user