mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Add MVT::is128BitVector and is64BitVector. Shrink
unaligned load/store code using them. Per review of unaligned load/store vector patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47782 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -250,6 +250,19 @@ namespace MVT { // MVT = Machine Value Types
|
||||
return (getSizeInBits(VT) + 7)/8*8;
|
||||
}
|
||||
|
||||
/// MVT::is64BitVector - Return true if this is a 64-bit vector type.
|
||||
static inline bool is64BitVector(ValueType VT) {
|
||||
return (VT==v8i8 || VT==v4i16 || VT==v2i32 || VT==v1i64 || VT==v2f32 ||
|
||||
(isExtendedVT(VT) && isVector(VT) && getSizeInBits(VT)==64));
|
||||
}
|
||||
|
||||
/// MVT::is128BitVector - Return true if this is a 128-bit vector type.
|
||||
static inline bool is128BitVector(ValueType VT) {
|
||||
return (VT==v16i8 || VT==v8i16 || VT==v4i32 || VT==v2i64 ||
|
||||
VT==v4f32 || VT==v2f64 ||
|
||||
(isExtendedVT(VT) && isVector(VT) && getSizeInBits(VT)==128));
|
||||
}
|
||||
|
||||
/// MVT::getIntegerType - Returns the ValueType that represents an integer
|
||||
/// with the given number of bits.
|
||||
///
|
||||
|
Reference in New Issue
Block a user