forked from OSchip/llvm-project
[AArch64/ARM] Fix two compiler warnings in InstructionSelector, NFCI
1) GCC complains that KnownValid is set but not used. 2) In ARMInstructionSelector::selectGlobal() the code is mixing "enumeral and non-enumeral type in conditional expression". Solve this by casting to unsigned which is the final type anyway. Differential Revision: https://reviews.llvm.org/D58834 llvm-svn: 355304
This commit is contained in:
parent
daea28ab64
commit
65a401f6a9
|
@ -503,6 +503,7 @@ static bool selectCopy(MachineInstr &I, const TargetInstrInfo &TII,
|
||||||
!TargetRegisterInfo::isPhysicalRegister(I.getOperand(1).getReg()))) &&
|
!TargetRegisterInfo::isPhysicalRegister(I.getOperand(1).getReg()))) &&
|
||||||
"No phys reg on generic operator!");
|
"No phys reg on generic operator!");
|
||||||
assert(KnownValid || isValidCopy(I, DstRegBank, MRI, TRI, RBI));
|
assert(KnownValid || isValidCopy(I, DstRegBank, MRI, TRI, RBI));
|
||||||
|
(void)KnownValid;
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -665,10 +665,11 @@ bool ARMInstructionSelector::selectGlobal(MachineInstrBuilder &MIB,
|
||||||
|
|
||||||
// FIXME: Taking advantage of MOVT for ELF is pretty involved, so we don't
|
// FIXME: Taking advantage of MOVT for ELF is pretty involved, so we don't
|
||||||
// support it yet. See PR28229.
|
// support it yet. See PR28229.
|
||||||
unsigned Opc = UseMovt && !STI.isTargetELF()
|
unsigned Opc =
|
||||||
? (UseOpcodeThatLoads ? ARM::MOV_ga_pcrel_ldr
|
UseMovt && !STI.isTargetELF()
|
||||||
|
? (UseOpcodeThatLoads ? (unsigned)ARM::MOV_ga_pcrel_ldr
|
||||||
: Opcodes.MOV_ga_pcrel)
|
: Opcodes.MOV_ga_pcrel)
|
||||||
: (UseOpcodeThatLoads ? ARM::LDRLIT_ga_pcrel_ldr
|
: (UseOpcodeThatLoads ? (unsigned)ARM::LDRLIT_ga_pcrel_ldr
|
||||||
: Opcodes.LDRLIT_ga_pcrel);
|
: Opcodes.LDRLIT_ga_pcrel);
|
||||||
MIB->setDesc(TII.get(Opc));
|
MIB->setDesc(TII.get(Opc));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue