forked from OSchip/llvm-project
GlobalISel: set correct regclass for LOAD_STACK_GUARD.
Since it's not actually a generic MI, its register operands need a RegClass, which is conveniently the target's pointer RegClass. llvm-svn: 293335
This commit is contained in:
parent
c9bc8a5580
commit
d8b85584f2
|
@ -477,6 +477,8 @@ bool IRTranslator::translateMemcpy(const CallInst &CI,
|
|||
|
||||
void IRTranslator::getStackGuard(unsigned DstReg,
|
||||
MachineIRBuilder &MIRBuilder) {
|
||||
const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo();
|
||||
MRI->setRegClass(DstReg, TRI->getPointerRegClass(*MF));
|
||||
auto MIB = MIRBuilder.buildInstr(TargetOpcode::LOAD_STACK_GUARD);
|
||||
MIB.addDef(DstReg);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; RUN: llc -mtriple=aarch64-apple-ios %s -stop-after=irtranslator -o - -global-isel | FileCheck %s
|
||||
; RUN: llc -verify-machineinstrs -mtriple=aarch64-apple-ios %s -stop-after=irtranslator -o - -global-isel | FileCheck %s
|
||||
|
||||
|
||||
; CHECK: name: test_stack_guard
|
||||
|
|
Loading…
Reference in New Issue