mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
[ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
IT blocks can only be one instruction lonf, and can only contain a subset of the 16 instructions. Patch by Artyom Skrobov! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190309 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -254,10 +254,10 @@ bool ARMFastISel::DefinesOptionalPredicate(MachineInstr *MI, bool *CPSR) {
|
||||
bool ARMFastISel::isARMNEONPred(const MachineInstr *MI) {
|
||||
const MCInstrDesc &MCID = MI->getDesc();
|
||||
|
||||
// If we're a thumb2 or not NEON function we were handled via isPredicable.
|
||||
// If we're a thumb2 or not NEON function we'll be handled via isPredicable.
|
||||
if ((MCID.TSFlags & ARMII::DomainMask) != ARMII::DomainNEON ||
|
||||
AFI->isThumb2Function())
|
||||
return false;
|
||||
return MI->isPredicable();
|
||||
|
||||
for (unsigned i = 0, e = MCID.getNumOperands(); i != e; ++i)
|
||||
if (MCID.OpInfo[i].isPredicate())
|
||||
@@ -278,7 +278,7 @@ ARMFastISel::AddOptionalDefs(const MachineInstrBuilder &MIB) {
|
||||
// Do we use a predicate? or...
|
||||
// Are we NEON in ARM mode and have a predicate operand? If so, I know
|
||||
// we're not predicable but add it anyways.
|
||||
if (TII.isPredicable(MI) || isARMNEONPred(MI))
|
||||
if (isARMNEONPred(MI))
|
||||
AddDefaultPred(MIB);
|
||||
|
||||
// Do we optionally set a predicate? Preds is size > 0 iff the predicate
|
||||
|
Reference in New Issue
Block a user