Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 497e4c4

Browse files
author
Jonas Paulsson
committed
[SystemZ] Minor bugfixes.
LLCH, LLHH and CLIH had the wrong register classes for the def-operand. Tie operands if changing opcode to an instruction with tied ops. Comment typo fix. These fixes were needed in order to make regression test case SystemZ/asm-18.ll pass with -verify-machineinstrs (not used by default). Reviewed by Ulrich Weigand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249811 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent eaacd7b commit 497e4c4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/Target/SystemZ/SystemZInstrInfo.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void SystemZInstrInfo::expandRIPseudo(MachineInstr *MI, unsigned LowOpcode,
111111
}
112112

113113
// MI is a three-operand RIE-style pseudo instruction. Replace it with
114-
// LowOpcode3 if the registers are both low GR32s, otherwise use a move
114+
// LowOpcodeK if the registers are both low GR32s, otherwise use a move
115115
// followed by HighOpcode or LowOpcode, depending on whether the target
116116
// is a high or low GR32.
117117
void SystemZInstrInfo::expandRIEPseudo(MachineInstr *MI, unsigned LowOpcode,
@@ -129,6 +129,7 @@ void SystemZInstrInfo::expandRIEPseudo(MachineInstr *MI, unsigned LowOpcode,
129129
MI->getOperand(1).isKill());
130130
MI->setDesc(get(DestIsHigh ? HighOpcode : LowOpcode));
131131
MI->getOperand(1).setReg(DestReg);
132+
MI->tieOperands(0, 1);
132133
}
133134
}
134135

lib/Target/SystemZ/SystemZInstrInfo.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,15 +490,15 @@ def : Pat<(and GR64:$src, 0xffffffff),
490490
def LLCMux : UnaryRXYPseudo<"llc", azextloadi8, GRX32, 1>,
491491
Requires<[FeatureHighWord]>;
492492
def LLC : UnaryRXY<"llc", 0xE394, azextloadi8, GR32, 1>;
493-
def LLCH : UnaryRXY<"llch", 0xE3C2, azextloadi8, GR32, 1>,
493+
def LLCH : UnaryRXY<"llch", 0xE3C2, azextloadi8, GRH32, 1>,
494494
Requires<[FeatureHighWord]>;
495495

496496
// 32-bit extensions from 16-bit memory. LLHMux expands to LLH or LLHH,
497497
// depending on the choice of register.
498498
def LLHMux : UnaryRXYPseudo<"llh", azextloadi16, GRX32, 2>,
499499
Requires<[FeatureHighWord]>;
500500
def LLH : UnaryRXY<"llh", 0xE395, azextloadi16, GR32, 2>;
501-
def LLHH : UnaryRXY<"llhh", 0xE3C6, azextloadi16, GR32, 2>,
501+
def LLHH : UnaryRXY<"llhh", 0xE3C6, azextloadi16, GRH32, 2>,
502502
Requires<[FeatureHighWord]>;
503503
def LLHRL : UnaryRILPC<"llhrl", 0xC42, aligned_azextloadi16, GR32>;
504504

@@ -1147,7 +1147,7 @@ let Defs = [CC], CCValues = 0xE, IsLogical = 1 in {
11471147
def CLFIMux : CompareRIPseudo<z_ucmp, GRX32, uimm32>,
11481148
Requires<[FeatureHighWord]>;
11491149
def CLFI : CompareRIL<"clfi", 0xC2F, z_ucmp, GR32, uimm32>;
1150-
def CLIH : CompareRIL<"clih", 0xCCF, z_ucmp, GR32, uimm32>,
1150+
def CLIH : CompareRIL<"clih", 0xCCF, z_ucmp, GRH32, uimm32>,
11511151
Requires<[FeatureHighWord]>;
11521152
def CLGFI : CompareRIL<"clgfi", 0xC2E, z_ucmp, GR64, imm64zx32>;
11531153

0 commit comments

Comments
 (0)