diff options
| author | Tim Northover <tnorthover@apple.com> | 2016-10-31 18:30:59 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2016-10-31 18:30:59 +0000 |
| commit | cdf23f1d93c974d038033305d2f2a7b98bd022a4 (patch) | |
| tree | cadcb90563402da8b397543445bf380587313256 /llvm/lib/Target | |
| parent | 0222eacf0fd6618cd41d113852efe0ebcc6eb4a1 (diff) | |
| download | bcm5719-llvm-cdf23f1d93c974d038033305d2f2a7b98bd022a4.tar.gz bcm5719-llvm-cdf23f1d93c974d038033305d2f2a7b98bd022a4.zip | |
GlobalISel: translate stack protector intrinsics
llvm-svn: 285614
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp index eb2614d482c..c5777598b65 100644 --- a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp @@ -478,15 +478,24 @@ bool AArch64InstructionSelector::select(MachineInstr &I) const { MachineFunction &MF = *MBB.getParent(); MachineRegisterInfo &MRI = MF.getRegInfo(); - if (!isPreISelGenericOpcode(I.getOpcode())) - return !I.isCopy() || selectCopy(I, TII, MRI, TRI, RBI); + unsigned Opcode = I.getOpcode(); + if (!isPreISelGenericOpcode(I.getOpcode())) { + // Certain non-generic instructions also need some special handling. + + if (Opcode == TargetOpcode::LOAD_STACK_GUARD) + return constrainSelectedInstRegOperands(I, TII, TRI, RBI); + else if (I.isCopy()) + return selectCopy(I, TII, MRI, TRI, RBI); + else + return true; + } + if (I.getNumOperands() != I.getNumExplicitOperands()) { DEBUG(dbgs() << "Generic instruction has unexpected implicit operands\n"); return false; } - unsigned Opcode = I.getOpcode(); LLT Ty = I.getOperand(0).isReg() ? MRI.getType(I.getOperand(0).getReg()) : LLT{}; |

