mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 10:04:33 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293335 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5041a6cc20
commit
946288f92c
@ -477,6 +477,8 @@ bool IRTranslator::translateMemcpy(const CallInst &CI,
|
|||||||
|
|
||||||
void IRTranslator::getStackGuard(unsigned DstReg,
|
void IRTranslator::getStackGuard(unsigned DstReg,
|
||||||
MachineIRBuilder &MIRBuilder) {
|
MachineIRBuilder &MIRBuilder) {
|
||||||
|
const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo();
|
||||||
|
MRI->setRegClass(DstReg, TRI->getPointerRegClass(*MF));
|
||||||
auto MIB = MIRBuilder.buildInstr(TargetOpcode::LOAD_STACK_GUARD);
|
auto MIB = MIRBuilder.buildInstr(TargetOpcode::LOAD_STACK_GUARD);
|
||||||
MIB.addDef(DstReg);
|
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
|
; CHECK: name: test_stack_guard
|
||||||
|
Loading…
Reference in New Issue
Block a user