mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[SystemZ] Don't build a PPA instruction with an immediate 0 operand.
The improvement in the machine verifier for operand types (D63973) discovered a bad operand in a test using a PPA instruction. It was an immediate 0 where a register was expected. This patch fixes this (NFC) by now making the PPA second register operand NoRegister instead of a zero immediate in the MIR. Review: Ulrich Weigand https://reviews.llvm.org/D70501
This commit is contained in:
parent
901cd5aed5
commit
348aec416e
@ -41,8 +41,12 @@ void SystemZInstPrinter::printAddress(unsigned Base, int64_t Disp,
|
||||
|
||||
void SystemZInstPrinter::printOperand(const MCOperand &MO, const MCAsmInfo *MAI,
|
||||
raw_ostream &O) {
|
||||
if (MO.isReg())
|
||||
O << '%' << getRegisterName(MO.getReg());
|
||||
if (MO.isReg()) {
|
||||
if (!MO.getReg())
|
||||
O << '0';
|
||||
else
|
||||
O << '%' << getRegisterName(MO.getReg());
|
||||
}
|
||||
else if (MO.isImm())
|
||||
O << MO.getImm();
|
||||
else if (MO.isExpr())
|
||||
|
@ -2069,7 +2069,7 @@ let Predicates = [FeatureProcessorAssist] in {
|
||||
def PPA : SideEffectTernaryRRFc<"ppa", 0xB2E8, GR64, GR64, imm32zx4>;
|
||||
def : Pat<(int_s390_ppa_txassist GR32:$src),
|
||||
(PPA (INSERT_SUBREG (i64 (IMPLICIT_DEF)), GR32:$src, subreg_l32),
|
||||
0, 1)>;
|
||||
zero_reg, 1)>;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user