From: Tim Northover Date: Thu, 3 Aug 2017 16:59:36 +0000 (+0000) Subject: Revert "[AArch64] Simplify AES*Tied pseudo expansion (NFC)." X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c984bb052f3f5778ec63c61183cf49fb8fdb3a12;p=llvm Revert "[AArch64] Simplify AES*Tied pseudo expansion (NFC)." This reverts commit r309821. My suggestion was wrong because it left the MachineOperands tied which confused the verifier. Since there's no easy way to untie operands, the original BuildMI solution is probably best. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309962 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp b/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp index d4d291066ca..fdb90f40aa8 100644 --- a/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp +++ b/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp @@ -967,10 +967,17 @@ bool AArch64ExpandPseudo::expandMI(MachineBasicBlock &MBB, return expandCMP_SWAP_128(MBB, MBBI, NextMBBI); case AArch64::AESMCrrTied: - case AArch64::AESIMCrrTied: - MI.setDesc(TII->get(Opcode == AArch64::AESMCrrTied ? AArch64::AESMCrr : - AArch64::AESIMCrr)); + case AArch64::AESIMCrrTied: { + MachineInstrBuilder MIB = + BuildMI(MBB, MBBI, MI.getDebugLoc(), + TII->get(Opcode == AArch64::AESMCrrTied ? AArch64::AESMCrr : + AArch64::AESIMCrr)) + .add(MI.getOperand(0)) + .add(MI.getOperand(1)); + transferImpOps(MI, MIB, MIB); + MI.eraseFromParent(); return true; + } } return false; }