llvm.org GIT mirror llvm / 4b87fb1
Merging r200288: ------------------------------------------------------------------------ r200288 | hfinkel | 2014-01-28 00:32:58 -0500 (Tue, 28 Jan 2014) | 5 lines Handle spilling the PPC GPRC_NOR0 register class GPRC_NOR0 is not a subclass of GPRC (because it also contains the ZERO pseudo register). As a result, we also need to check for it in the spilling code. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@205821 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 6 years ago
2 changed file(s) with 31 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
569569 // update isStoreToStackSlot.
570570
571571 DebugLoc DL;
572 if (PPC::GPRCRegClass.hasSubClassEq(RC)) {
572 if (PPC::GPRCRegClass.hasSubClassEq(RC) ||
573 PPC::GPRC_NOR0RegClass.hasSubClassEq(RC)) {
573574 NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::STW))
574575 .addReg(SrcReg,
575576 getKillRegState(isKill)),
576577 FrameIdx));
577 } else if (PPC::G8RCRegClass.hasSubClassEq(RC)) {
578 } else if (PPC::G8RCRegClass.hasSubClassEq(RC) ||
579 PPC::G8RC_NOX0RegClass.hasSubClassEq(RC)) {
578580 NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::STD))
579581 .addReg(SrcReg,
580582 getKillRegState(isKill)),
694696 // Note: If additional load instructions are added here,
695697 // update isLoadFromStackSlot.
696698
697 if (PPC::GPRCRegClass.hasSubClassEq(RC)) {
699 if (PPC::GPRCRegClass.hasSubClassEq(RC) ||
700 PPC::GPRC_NOR0RegClass.hasSubClassEq(RC)) {
698701 NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::LWZ),
699702 DestReg), FrameIdx));
700 } else if (PPC::G8RCRegClass.hasSubClassEq(RC)) {
703 } else if (PPC::G8RCRegClass.hasSubClassEq(RC) ||
704 PPC::G8RC_NOX0RegClass.hasSubClassEq(RC)) {
701705 NewMIs.push_back(addFrameReference(BuildMI(MF, DL, get(PPC::LD), DestReg),
702706 FrameIdx));
703707 } else if (PPC::F8RCRegClass.hasSubClassEq(RC)) {
0 ; RUN: llc < %s -O0 -mcpu=ppc64 | FileCheck %s
1 target datalayout = "E-m:e-i64:64-n32:64"
2 target triple = "powerpc64-unknown-linux-gnu"
3
4 ; Function Attrs: nounwind
5 define void @_ZN4llvm3sys17RunningOnValgrindEv() #0 {
6 entry:
7 br i1 undef, label %if.then, label %if.end
8
9 if.then: ; preds = %entry
10 ret void
11
12 if.end: ; preds = %entry
13 %0 = call i64 asm sideeffect "mr 3,$1\0A\09mr 4,$2\0A\09rotldi 0,0,3 ; rotldi 0,0,13\0A\09rotldi 0,0,61 ; rotldi 0,0,51\0A\09or 1,1,1\0A\09mr $0,3", "=b,b,b,~{cc},~{memory},~{r3},~{r4}"(i32 0, i64* undef) #0
14 unreachable
15
16 ; CHECK-LABEL: @_ZN4llvm3sys17RunningOnValgrindEv
17 ; CHECK: stw
18 ; CHECK: lwz
19 }
20
21 attributes #0 = { nounwind }
22