mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-15 16:07:49 +00:00
Add support for targets that require promotions.
llvm-svn: 19579
This commit is contained in:
parent
8c4c81d6b3
commit
1de18d422e
@ -77,7 +77,12 @@ namespace llvm {
|
||||
// The common case is that we will only create one register for this
|
||||
// value. If we have that case, create and return the virtual register.
|
||||
unsigned NV = TLI.getNumElements(VT);
|
||||
if (NV == 1) return MakeReg(VT);
|
||||
if (NV == 1) {
|
||||
// If we are promoting this value, pick the next largest supported type.
|
||||
while (!TLI.hasNativeSupportFor(VT))
|
||||
VT = (MVT::ValueType)(VT+1);
|
||||
return MakeReg(VT);
|
||||
}
|
||||
|
||||
// If this value is represented with multiple target registers, make sure
|
||||
// to create enough consequtive registers of the right (smaller) type.
|
||||
|
Loading…
x
Reference in New Issue
Block a user