[llvm] 78ccb03 - [AArch64][GlobalISel] Don't use explicit zero registers for compare results.
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 16:49:53 PDT 2020
Author: Amara Emerson
Date: 2020-10-14T16:49:33-07:00
New Revision: 78ccb0359d8da3269636d85933dd8afe50a2211f
URL: https://github.com/llvm/llvm-project/commit/78ccb0359d8da3269636d85933dd8afe50a2211f
DIFF: https://github.com/llvm/llvm-project/commit/78ccb0359d8da3269636d85933dd8afe50a2211f.diff
LOG: [AArch64][GlobalISel] Don't use explicit zero registers for compare results.
These cause problems for later optimizations, just using an unused vreg like
SelectionDAG generates better code in the end, and obviates the need for some
GISel specific flag optimizations.
Differential Revision: https://reviews.llvm.org/D89419
Added:
Modified:
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
llvm/test/CodeGen/AArch64/GlobalISel/fold-fp-select.mir
llvm/test/CodeGen/AArch64/GlobalISel/fold-select.mir
llvm/test/CodeGen/AArch64/GlobalISel/opt-and-tbnz-tbz.mir
llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir
llvm/test/CodeGen/AArch64/GlobalISel/opt-shifted-reg-compare.mir
llvm/test/CodeGen/AArch64/GlobalISel/preselect-process-phis.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-arith-immed-compare.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-cbz.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-cmp.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt-constrain.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir
llvm/test/CodeGen/AArch64/GlobalISel/select-select.mir
llvm/test/CodeGen/AArch64/GlobalISel/select.mir
llvm/test/CodeGen/AArch64/GlobalISel/tbnz-slt.mir
llvm/test/CodeGen/AArch64/GlobalISel/tbz-sgt.mir
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
index 82eca0bbb9c4..3686c8dc09ac 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
@@ -2836,9 +2836,12 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
return true;
Register CSelOpc = selectSelectOpc(I, MRI, RBI);
+ // Make sure to use an unused vreg instead of wzr, so that the peephole
+ // optimizations will be able to optimize these.
+ Register DeadVReg = MRI.createVirtualRegister(&AArch64::GPR32RegClass);
MachineInstr &TstMI =
*BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::ANDSWri))
- .addDef(AArch64::WZR)
+ .addDef(DeadVReg)
.addUse(CondReg)
.addImm(AArch64_AM::encodeLogicalImmediate(1, 32));
@@ -3853,17 +3856,17 @@ AArch64InstructionSelector::emitTST(MachineOperand &LHS, MachineOperand &RHS,
MachineIRBuilder &MIRBuilder) const {
assert(LHS.isReg() && RHS.isReg() && "Expected register operands?");
MachineRegisterInfo &MRI = MIRBuilder.getMF().getRegInfo();
- unsigned RegSize = MRI.getType(LHS.getReg()).getSizeInBits();
+ LLT Ty = MRI.getType(LHS.getReg());
+ unsigned RegSize = Ty.getSizeInBits();
bool Is32Bit = (RegSize == 32);
const unsigned OpcTable[3][2] = {{AArch64::ANDSXri, AArch64::ANDSWri},
{AArch64::ANDSXrs, AArch64::ANDSWrs},
{AArch64::ANDSXrr, AArch64::ANDSWrr}};
- Register ZReg = Is32Bit ? AArch64::WZR : AArch64::XZR;
// ANDS needs a logical immediate for its immediate form. Check if we can
// fold one in.
if (auto ValAndVReg = getConstantVRegValWithLookThrough(RHS.getReg(), MRI)) {
if (AArch64_AM::isLogicalImmediate(ValAndVReg->Value, RegSize)) {
- auto TstMI = MIRBuilder.buildInstr(OpcTable[0][Is32Bit], {ZReg}, {LHS});
+ auto TstMI = MIRBuilder.buildInstr(OpcTable[0][Is32Bit], {Ty}, {LHS});
TstMI.addImm(
AArch64_AM::encodeLogicalImmediate(ValAndVReg->Value, RegSize));
constrainSelectedInstRegOperands(*TstMI, TII, TRI, RBI);
@@ -3872,8 +3875,8 @@ AArch64InstructionSelector::emitTST(MachineOperand &LHS, MachineOperand &RHS,
}
if (auto Fns = selectLogicalShiftedRegister(RHS))
- return emitInstr(OpcTable[1][Is32Bit], {ZReg}, {LHS}, MIRBuilder, Fns);
- return emitInstr(OpcTable[2][Is32Bit], {ZReg}, {LHS, RHS}, MIRBuilder);
+ return emitInstr(OpcTable[1][Is32Bit], {Ty}, {LHS}, MIRBuilder, Fns);
+ return emitInstr(OpcTable[2][Is32Bit], {Ty}, {LHS, RHS}, MIRBuilder);
}
std::pair<MachineInstr *, CmpInst::Predicate>
@@ -4391,17 +4394,14 @@ MachineInstr *AArch64InstructionSelector::tryOptArithImmedIntegerCompare(
// At this point, we know we can select an immediate form. Go ahead and do
// that.
- Register ZReg;
unsigned Opc;
if (Size == 32) {
- ZReg = AArch64::WZR;
Opc = AArch64::SUBSWri;
} else {
- ZReg = AArch64::XZR;
Opc = AArch64::SUBSXri;
}
- auto CmpMI = MIB.buildInstr(Opc, {ZReg}, {LHS.getReg()});
+ auto CmpMI = MIB.buildInstr(Opc, {Ty}, {LHS.getReg()});
for (auto &RenderFn : *ImmFns)
RenderFn(CmpMI);
constrainSelectedInstRegOperands(*CmpMI, TII, TRI, RBI);
@@ -4419,7 +4419,6 @@ MachineInstr *AArch64InstructionSelector::tryOptArithShiftedCompare(
// Since we will select the G_ICMP to a SUBS, we can potentially fold the
// shift into the subtract.
static const unsigned OpcTable[2] = {AArch64::SUBSWrs, AArch64::SUBSXrs};
- static const Register ZRegTable[2] = {AArch64::WZR, AArch64::XZR};
auto ImmFns = selectShiftedRegister(RHS);
if (!ImmFns)
return nullptr;
@@ -4428,9 +4427,8 @@ MachineInstr *AArch64InstructionSelector::tryOptArithShiftedCompare(
assert(!Ty.isVector() && "Expected scalar or pointer only?");
unsigned Size = Ty.getSizeInBits();
bool Idx = (Size == 64);
- Register ZReg = ZRegTable[Idx];
unsigned Opc = OpcTable[Idx];
- auto CmpMI = MIB.buildInstr(Opc, {ZReg}, {LHS.getReg()});
+ auto CmpMI = MIB.buildInstr(Opc, {Ty}, {LHS.getReg()});
for (auto &RenderFn : *ImmFns)
RenderFn(CmpMI);
constrainSelectedInstRegOperands(*CmpMI, TII, TRI, RBI);
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/fold-fp-select.mir b/llvm/test/CodeGen/AArch64/GlobalISel/fold-fp-select.mir
index 7a34b778f8b6..93b0b95e4eb9 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/fold-fp-select.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/fold-fp-select.mir
@@ -31,7 +31,7 @@ body: |
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
; CHECK: [[COPY2:%[0-9]+]]:fpr32 = COPY [[CSINCWr]]
; CHECK: [[COPY3:%[0-9]+]]:gpr32 = COPY [[COPY2]]
- ; CHECK: $wzr = ANDSWri [[COPY3]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY3]], 0, implicit-def $nzcv
; CHECK: [[FCSELSrrr:%[0-9]+]]:fpr32 = FCSELSrrr [[FMOVS0_]], [[COPY1]], 1, implicit $nzcv
; CHECK: $w1 = COPY [[CSINCWr]]
; CHECK: $s0 = COPY [[FCSELSrrr]]
@@ -98,7 +98,7 @@ body: |
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY $s0
; CHECK: [[FMOVS0_:%[0-9]+]]:fpr32 = FMOVS0
- ; CHECK: $wzr = SUBSWri [[COPY]], 0, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 0, 0, implicit-def $nzcv
; CHECK: [[FCSELSrrr:%[0-9]+]]:fpr32 = FCSELSrrr [[COPY1]], [[FMOVS0_]], 0, implicit $nzcv
; CHECK: $s0 = COPY [[FCSELSrrr]]
; CHECK: RET_ReallyLR implicit $s0
@@ -165,7 +165,7 @@ body: |
; CHECK: [[ORRWrr:%[0-9]+]]:gpr32 = ORRWrr [[CSINCWr]], [[CSINCWr1]]
; CHECK: [[COPY2:%[0-9]+]]:fpr32 = COPY [[ORRWrr]]
; CHECK: [[COPY3:%[0-9]+]]:gpr32 = COPY [[COPY2]]
- ; CHECK: $wzr = ANDSWri [[COPY3]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY3]], 0, implicit-def $nzcv
; CHECK: [[FCSELSrrr:%[0-9]+]]:fpr32 = FCSELSrrr [[FMOVS0_]], [[COPY1]], 1, implicit $nzcv
; CHECK: $s0 = COPY [[FCSELSrrr]]
; CHECK: RET_ReallyLR implicit $s0
@@ -201,7 +201,7 @@ body: |
; CHECK: [[ORRWrr:%[0-9]+]]:gpr32 = ORRWrr [[CSINCWr]], [[CSINCWr1]]
; CHECK: [[COPY2:%[0-9]+]]:fpr32 = COPY [[ORRWrr]]
; CHECK: [[COPY3:%[0-9]+]]:gpr32 = COPY [[COPY2]]
- ; CHECK: $wzr = ANDSWri [[COPY3]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY3]], 0, implicit-def $nzcv
; CHECK: [[FCSELSrrr:%[0-9]+]]:fpr32 = FCSELSrrr [[COPY1]], [[FMOVS0_]], 1, implicit $nzcv
; CHECK: $s0 = COPY [[FCSELSrrr]]
; CHECK: RET_ReallyLR implicit $s0
@@ -297,7 +297,7 @@ body: |
; CHECK: [[ORRWrr:%[0-9]+]]:gpr32 = ORRWrr [[CSINCWr]], [[CSINCWr1]]
; CHECK: [[COPY2:%[0-9]+]]:fpr32 = COPY [[ORRWrr]]
; CHECK: [[COPY3:%[0-9]+]]:gpr32 = COPY [[COPY2]]
- ; CHECK: $wzr = ANDSWri [[COPY3]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY3]], 0, implicit-def $nzcv
; CHECK: [[FCSELDrrr:%[0-9]+]]:fpr64 = FCSELDrrr [[FMOVD0_]], [[COPY1]], 1, implicit $nzcv
; CHECK: $d0 = COPY [[FCSELDrrr]]
; CHECK: RET_ReallyLR implicit $d0
@@ -333,7 +333,7 @@ body: |
; CHECK: [[ORRWrr:%[0-9]+]]:gpr32 = ORRWrr [[CSINCWr]], [[CSINCWr1]]
; CHECK: [[COPY2:%[0-9]+]]:fpr32 = COPY [[ORRWrr]]
; CHECK: [[COPY3:%[0-9]+]]:gpr32 = COPY [[COPY2]]
- ; CHECK: $wzr = ANDSWri [[COPY3]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY3]], 0, implicit-def $nzcv
; CHECK: [[FCSELDrrr:%[0-9]+]]:fpr64 = FCSELDrrr [[COPY1]], [[FMOVD0_]], 1, implicit $nzcv
; CHECK: $d0 = COPY [[FCSELDrrr]]
; CHECK: RET_ReallyLR implicit $d0
@@ -394,7 +394,7 @@ body: |
; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY $s0
; CHECK: [[FMOVS0_:%[0-9]+]]:fpr32 = FMOVS0
; CHECK: BL @copy_from_physreg, implicit-def $w0
- ; CHECK: $wzr = ANDSWri [[COPY]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY]], 0, implicit-def $nzcv
; CHECK: [[FCSELSrrr:%[0-9]+]]:fpr32 = FCSELSrrr [[COPY1]], [[FMOVS0_]], 1, implicit $nzcv
; CHECK: BL @copy_from_physreg, implicit-def $w0
; CHECK: $s0 = COPY [[FCSELSrrr]]
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/fold-select.mir b/llvm/test/CodeGen/AArch64/GlobalISel/fold-select.mir
index 0f54e9b548d8..0bef7fd48b45 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/fold-select.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/fold-select.mir
@@ -22,7 +22,7 @@ body: |
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
; CHECK: [[COPY2:%[0-9]+]]:gpr32 = COPY $wzr
- ; CHECK: $wzr = SUBSWri [[COPY]], 0, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 0, 0, implicit-def $nzcv
; CHECK: [[CSELWr:%[0-9]+]]:gpr32 = CSELWr [[COPY2]], [[COPY1]], 0, implicit $nzcv
; CHECK: $w0 = COPY [[CSELWr]]
; CHECK: RET_ReallyLR implicit $w0
@@ -84,7 +84,7 @@ body: |
; CHECK: %copy1:gpr32sp = COPY $w0
; CHECK: %copy2:gpr32 = COPY $w1
; CHECK: %cst:gpr32 = MOVi32imm -1
- ; CHECK: $wzr = SUBSWri %copy1, 0, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri %copy1, 0, 0, implicit-def $nzcv
; CHECK: %select:gpr32 = CSELWr %cst, %copy2, 11, implicit $nzcv
; CHECK: $w0 = COPY %select
; CHECK: RET_ReallyLR implicit $w0
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/opt-and-tbnz-tbz.mir b/llvm/test/CodeGen/AArch64/GlobalISel/opt-and-tbnz-tbz.mir
index d2042bee9c4b..bb6ba25d06f7 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/opt-and-tbnz-tbz.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/opt-and-tbnz-tbz.mir
@@ -142,7 +142,7 @@ body: |
; CHECK: successors: %bb.0(0x40000000), %bb.1(0x40000000)
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
- ; CHECK: $wzr = ANDSWri [[COPY]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY]], 0, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 10, implicit $nzcv
; CHECK: TBNZW [[CSINCWr]], 0, %bb.1
; CHECK: B %bb.0
@@ -175,7 +175,7 @@ body: |
; CHECK: successors: %bb.0(0x40000000), %bb.1(0x40000000)
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
- ; CHECK: $wzr = ANDSWri [[COPY]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY]], 0, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 13, implicit $nzcv
; CHECK: TBNZW [[CSINCWr]], 0, %bb.1
; CHECK: B %bb.0
@@ -237,7 +237,7 @@ body: |
; CHECK: successors: %bb.0(0x40000000), %bb.1(0x40000000)
; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
; CHECK: [[ANDXri:%[0-9]+]]:gpr64sp = ANDXri [[COPY]], 8064
- ; CHECK: $xzr = SUBSXri [[ANDXri]], 4, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[ANDXri]], 4, 0, implicit-def $nzcv
; CHECK: Bcc 1, %bb.1, implicit $nzcv
; CHECK: B %bb.0
; CHECK: bb.1:
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir b/llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir
index e58d97304d2b..bde969b0f02d 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir
@@ -308,7 +308,7 @@ body: |
; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w1
; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $wzr
; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1
- ; CHECK: $wzr = ANDSWrr [[COPY1]], [[COPY]], implicit-def $nzcv
+ ; CHECK: [[ANDSWrr:%[0-9]+]]:gpr32 = ANDSWrr [[COPY1]], [[COPY]], implicit-def $nzcv
; CHECK: [[CSELWr:%[0-9]+]]:gpr32 = CSELWr [[MOVi32imm]], [[COPY1]], 0, implicit $nzcv
; CHECK: $w0 = COPY [[CSELWr]]
; CHECK: RET_ReallyLR implicit $w0
@@ -340,7 +340,7 @@ body: |
; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $xzr
; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1
; CHECK: [[SUBREG_TO_REG:%[0-9]+]]:gpr64 = SUBREG_TO_REG 0, [[MOVi32imm]], %subreg.sub_32
- ; CHECK: $xzr = ANDSXrr [[COPY1]], [[COPY]], implicit-def $nzcv
+ ; CHECK: [[ANDSXrr:%[0-9]+]]:gpr64 = ANDSXrr [[COPY1]], [[COPY]], implicit-def $nzcv
; CHECK: [[CSELXr:%[0-9]+]]:gpr64 = CSELXr [[SUBREG_TO_REG]], [[COPY1]], 0, implicit $nzcv
; CHECK: $x0 = COPY [[CSELXr]]
; CHECK: RET_ReallyLR implicit $x0
@@ -372,7 +372,7 @@ body: |
; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $wzr
; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1
; CHECK: [[ANDWrr:%[0-9]+]]:gpr32common = ANDWrr [[COPY1]], [[COPY]]
- ; CHECK: $wzr = SUBSWri [[ANDWrr]], 0, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[ANDWrr]], 0, 0, implicit-def $nzcv
; CHECK: [[CSELWr:%[0-9]+]]:gpr32 = CSELWr [[MOVi32imm]], [[COPY1]], 8, implicit $nzcv
; CHECK: $w0 = COPY [[CSELWr]]
; CHECK: RET_ReallyLR implicit $w0
@@ -404,7 +404,7 @@ body: |
; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $wzr
; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1
; CHECK: [[ANDWrr:%[0-9]+]]:gpr32common = ANDWrr [[COPY1]], [[COPY]]
- ; CHECK: $wzr = SUBSWri [[ANDWrr]], 42, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[ANDWrr]], 42, 0, implicit-def $nzcv
; CHECK: [[CSELWr:%[0-9]+]]:gpr32 = CSELWr [[MOVi32imm]], [[COPY1]], 8, implicit $nzcv
; CHECK: $w0 = COPY [[CSELWr]]
; CHECK: RET_ReallyLR implicit $w0
@@ -433,7 +433,7 @@ body: |
; CHECK-LABEL: name: imm_tst
; CHECK: liveins: $w0, $w1
; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w1
- ; CHECK: $wzr = ANDSWri [[COPY]], 1, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY]], 1, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
; CHECK: $w0 = COPY [[CSINCWr]]
; CHECK: RET_ReallyLR implicit $w0
@@ -466,7 +466,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w1
; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm -1
- ; CHECK: $wzr = ANDSWrr [[COPY]], [[MOVi32imm]], implicit-def $nzcv
+ ; CHECK: [[ANDSWrr:%[0-9]+]]:gpr32 = ANDSWrr [[COPY]], [[MOVi32imm]], implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
; CHECK: $w0 = COPY [[CSINCWr]]
; CHECK: RET_ReallyLR implicit $w0
@@ -529,7 +529,7 @@ body: |
; CHECK: %zero:gpr64 = COPY $xzr
; CHECK: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1
; CHECK: %one:gpr64 = SUBREG_TO_REG 0, [[MOVi32imm]], %subreg.sub_32
- ; CHECK: $xzr = ANDSXrs %zero, %copy, 16, implicit-def $nzcv
+ ; CHECK: [[ANDSXrs:%[0-9]+]]:gpr64 = ANDSXrs %zero, %copy, 16, implicit-def $nzcv
; CHECK: %select:gpr64 = CSELXr %one, %zero, 0, implicit $nzcv
; CHECK: $x0 = COPY %select
; CHECK: RET_ReallyLR implicit $x0
@@ -562,7 +562,7 @@ body: |
; CHECK: %copy:gpr32 = COPY $w1
; CHECK: %zero:gpr32 = COPY $wzr
; CHECK: %one:gpr32 = MOVi32imm 1
- ; CHECK: $wzr = ANDSWrs %zero, %copy, 16, implicit-def $nzcv
+ ; CHECK: [[ANDSWrs:%[0-9]+]]:gpr32 = ANDSWrs %zero, %copy, 16, implicit-def $nzcv
; CHECK: %select:gpr32 = CSELWr %one, %zero, 0, implicit $nzcv
; CHECK: $w0 = COPY %select
; CHECK: RET_ReallyLR implicit $w0
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/opt-shifted-reg-compare.mir b/llvm/test/CodeGen/AArch64/GlobalISel/opt-shifted-reg-compare.mir
index a4191f5ffd56..7fafdd0c4f21 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/opt-shifted-reg-compare.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/opt-shifted-reg-compare.mir
@@ -23,7 +23,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -49,7 +49,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -75,7 +75,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -101,7 +101,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 0, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -127,7 +127,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 0, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -153,7 +153,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 0, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -179,7 +179,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 2, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -204,7 +204,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 2, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -229,7 +229,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 2, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -254,7 +254,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 9, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -279,7 +279,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 9, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -304,7 +304,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 9, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -331,7 +331,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 3, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -356,7 +356,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 3, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -381,7 +381,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 3, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -408,7 +408,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 8, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -433,7 +433,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 8, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -458,7 +458,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 8, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -484,7 +484,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 10, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -509,7 +509,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 10, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -534,7 +534,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 10, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -559,7 +559,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 13, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -584,7 +584,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 13, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -609,7 +609,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 13, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -634,7 +634,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 11, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -659,7 +659,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 11, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -684,7 +684,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 11, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -711,7 +711,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 3, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 12, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -736,7 +736,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 131, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 12, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
@@ -761,7 +761,7 @@ body: |
; CHECK: liveins: $w0, $w1
; CHECK: %copy0:gpr32 = COPY $w0
; CHECK: %copy1:gpr32 = COPY $w1
- ; CHECK: $wzr = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
+ ; CHECK: [[SUBSWrs:%[0-9]+]]:gpr32 = SUBSWrs %copy1, %copy0, 67, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 12, implicit $nzcv
; CHECK: $w0 = COPY %cmp
; CHECK: RET_ReallyLR implicit $w0
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/preselect-process-phis.mir b/llvm/test/CodeGen/AArch64/GlobalISel/preselect-process-phis.mir
index 1b7c07401899..c427d8004d9a 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/preselect-process-phis.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/preselect-process-phis.mir
@@ -21,7 +21,7 @@ body: |
; CHECK: bb.1:
; CHECK: successors: %bb.2(0x80000000)
; CHECK: [[DEF2:%[0-9]+]]:gpr32 = IMPLICIT_DEF
- ; CHECK: $wzr = ANDSWri [[DEF]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[DEF]], 0, implicit-def $nzcv
; CHECK: [[CSELWr:%[0-9]+]]:gpr32 = CSELWr [[DEF2]], [[DEF2]], 1, implicit $nzcv
; CHECK: bb.2:
; CHECK: successors: %bb.2(0x80000000)
@@ -75,7 +75,7 @@ body: |
; CHECK: bb.1:
; CHECK: successors: %bb.2(0x80000000)
; CHECK: [[DEF2:%[0-9]+]]:gpr32 = IMPLICIT_DEF
- ; CHECK: $wzr = ANDSWri [[DEF]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[DEF]], 0, implicit-def $nzcv
; CHECK: [[CSELWr:%[0-9]+]]:gpr32 = CSELWr [[DEF2]], [[DEF2]], 1, implicit $nzcv
; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY [[CSELWr]]
; CHECK: [[COPY2:%[0-9]+]]:fpr16 = COPY [[COPY1]].hsub
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/select-arith-immed-compare.mir b/llvm/test/CodeGen/AArch64/GlobalISel/select-arith-immed-compare.mir
index 37d7ec60f553..605e56e349ee 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/select-arith-immed-compare.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/select-arith-immed-compare.mir
@@ -21,7 +21,7 @@ body: |
; CHECK-LABEL: name: slt_to_sle_s32
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri [[COPY]], 1, 12, implicit-def $nzcv
+ ; CHECK: SUBSWri [[COPY]], 1, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 12, implicit $nzcv
; CHECK: [[ANDWri:%[0-9]+]]:gpr32sp = ANDWri [[CSINCWr]], 0
; CHECK: $w0 = COPY [[ANDWri]]
@@ -56,7 +56,7 @@ body: |
; CHECK-LABEL: name: slt_to_sle_s64
; CHECK: liveins: $x0
; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
- ; CHECK: $xzr = SUBSXri [[COPY]], 1, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[COPY]], 1, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 12, implicit $nzcv
; CHECK: [[DEF:%[0-9]+]]:gpr64all = IMPLICIT_DEF
; CHECK: [[INSERT_SUBREG:%[0-9]+]]:gpr64 = INSERT_SUBREG [[DEF]], [[CSINCWr]], %subreg.sub_32
@@ -94,7 +94,7 @@ body: |
; CHECK-LABEL: name: sge_to_sgt_s32
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri [[COPY]], 1, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 13, implicit $nzcv
; CHECK: [[ANDWri:%[0-9]+]]:gpr32sp = ANDWri [[CSINCWr]], 0
; CHECK: $w0 = COPY [[ANDWri]]
@@ -129,7 +129,7 @@ body: |
; CHECK-LABEL: name: sge_to_sgt_s64
; CHECK: liveins: $x0
; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
- ; CHECK: $xzr = SUBSXri [[COPY]], 1, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[COPY]], 1, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 13, implicit $nzcv
; CHECK: [[DEF:%[0-9]+]]:gpr64all = IMPLICIT_DEF
; CHECK: [[INSERT_SUBREG:%[0-9]+]]:gpr64 = INSERT_SUBREG [[DEF]], [[CSINCWr]], %subreg.sub_32
@@ -167,7 +167,7 @@ body: |
; CHECK-LABEL: name: ult_to_ule_s32
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri [[COPY]], 1, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 8, implicit $nzcv
; CHECK: [[ANDWri:%[0-9]+]]:gpr32sp = ANDWri [[CSINCWr]], 0
; CHECK: $w0 = COPY [[ANDWri]]
@@ -202,7 +202,7 @@ body: |
; CHECK-LABEL: name: ult_to_ule_s64
; CHECK: liveins: $x0
; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
- ; CHECK: $xzr = SUBSXri [[COPY]], 1, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[COPY]], 1, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 8, implicit $nzcv
; CHECK: [[DEF:%[0-9]+]]:gpr64all = IMPLICIT_DEF
; CHECK: [[INSERT_SUBREG:%[0-9]+]]:gpr64 = INSERT_SUBREG [[DEF]], [[CSINCWr]], %subreg.sub_32
@@ -240,7 +240,7 @@ body: |
; CHECK-LABEL: name: uge_to_ugt_s32
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri [[COPY]], 1, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 9, implicit $nzcv
; CHECK: [[ANDWri:%[0-9]+]]:gpr32sp = ANDWri [[CSINCWr]], 0
; CHECK: $w0 = COPY [[ANDWri]]
@@ -275,7 +275,7 @@ body: |
; CHECK-LABEL: name: uge_to_ugt_s64
; CHECK: liveins: $x0
; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
- ; CHECK: $xzr = SUBSXri [[COPY]], 1, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[COPY]], 1, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 9, implicit $nzcv
; CHECK: [[DEF:%[0-9]+]]:gpr64all = IMPLICIT_DEF
; CHECK: [[INSERT_SUBREG:%[0-9]+]]:gpr64 = INSERT_SUBREG [[DEF]], [[CSINCWr]], %subreg.sub_32
@@ -315,7 +315,7 @@ body: |
; CHECK-LABEL: name: sle_to_slt_s32
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri [[COPY]], 2, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 2, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 10, implicit $nzcv
; CHECK: [[ANDWri:%[0-9]+]]:gpr32sp = ANDWri [[CSINCWr]], 0
; CHECK: $w0 = COPY [[ANDWri]]
@@ -350,7 +350,7 @@ body: |
; CHECK-LABEL: name: sle_to_slt_s64
; CHECK: liveins: $x0
; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
- ; CHECK: $xzr = SUBSXri [[COPY]], 2, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[COPY]], 2, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 10, implicit $nzcv
; CHECK: [[DEF:%[0-9]+]]:gpr64all = IMPLICIT_DEF
; CHECK: [[INSERT_SUBREG:%[0-9]+]]:gpr64 = INSERT_SUBREG [[DEF]], [[CSINCWr]], %subreg.sub_32
@@ -388,7 +388,7 @@ body: |
; CHECK-LABEL: name: sgt_to_sge_s32
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri [[COPY]], 2, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 2, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 11, implicit $nzcv
; CHECK: [[ANDWri:%[0-9]+]]:gpr32sp = ANDWri [[CSINCWr]], 0
; CHECK: $w0 = COPY [[ANDWri]]
@@ -423,7 +423,7 @@ body: |
; CHECK-LABEL: name: sgt_to_sge_s64
; CHECK: liveins: $x0
; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
- ; CHECK: $xzr = SUBSXri [[COPY]], 2, 12, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[COPY]], 2, 12, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 11, implicit $nzcv
; CHECK: [[DEF:%[0-9]+]]:gpr64all = IMPLICIT_DEF
; CHECK: [[INSERT_SUBREG:%[0-9]+]]:gpr64 = INSERT_SUBREG [[DEF]], [[CSINCWr]], %subreg.sub_32
@@ -612,7 +612,7 @@ body: |
; CHECK-LABEL: name: no_opt_zero
; CHECK: liveins: $x0
; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
- ; CHECK: $xzr = SUBSXri [[COPY]], 0, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[COPY]], 0, 0, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 2, implicit $nzcv
; CHECK: [[DEF:%[0-9]+]]:gpr64all = IMPLICIT_DEF
; CHECK: [[INSERT_SUBREG:%[0-9]+]]:gpr64 = INSERT_SUBREG [[DEF]], [[CSINCWr]], %subreg.sub_32
@@ -648,9 +648,9 @@ body: |
; CHECK: %a:gpr64common = COPY $x0
; CHECK: %b:gpr64 = COPY $x1
; CHECK: %c:gpr64 = COPY $x2
- ; CHECK: $xzr = SUBSXri %a, 0, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri %a, 0, 0, implicit-def $nzcv
; CHECK: %select1:gpr64 = CSELXr %a, %b, 11, implicit $nzcv
- ; CHECK: $xzr = SUBSXri %a, 0, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSXri1:%[0-9]+]]:gpr64 = SUBSXri %a, 0, 0, implicit-def $nzcv
; CHECK: %select2:gpr64 = CSELXr %b, %c, 11, implicit $nzcv
; CHECK: %add:gpr64 = ADDXrr %select1, %select2
; CHECK: $x0 = COPY %add
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/select-cbz.mir b/llvm/test/CodeGen/AArch64/GlobalISel/select-cbz.mir
index f5ebbc2944b6..68d515b529e4 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/select-cbz.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/select-cbz.mir
@@ -158,7 +158,7 @@ body: |
; CHECK: liveins: $x0
; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
; CHECK: [[LDRXui:%[0-9]+]]:gpr64common = LDRXui [[COPY]], 0 :: (load 8)
- ; CHECK: $xzr = SUBSXri [[LDRXui]], 42, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[LDRXui]], 42, 0, implicit-def $nzcv
; CHECK: Bcc 0, %bb.2, implicit $nzcv
; CHECK: bb.1:
; CHECK: successors: %bb.2(0x80000000)
@@ -191,18 +191,18 @@ legalized: true
regBankSelected: true
body: |
- ; The G_ICMP here will be optimized into a slt against 0.
- ; The branch should inherit this change, so we should have Bcc 11 rather than
- ; Bcc 13.
-
; CHECK-LABEL: name: update_pred_minus_one
; CHECK: bb.0:
; CHECK: successors: %bb.0(0x40000000), %bb.1(0x40000000)
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri [[COPY]], 0, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 0, 0, implicit-def $nzcv
; CHECK: Bcc 11, %bb.1, implicit $nzcv
; CHECK: B %bb.0
; CHECK: bb.1:
+ ; The G_ICMP here will be optimized into a slt against 0.
+ ; The branch should inherit this change, so we should have Bcc 11 rather than
+ ; Bcc 13.
+
bb.0:
liveins: $w0
successors: %bb.0, %bb.1
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/select-cmp.mir b/llvm/test/CodeGen/AArch64/GlobalISel/select-cmp.mir
index 6932f59aee6d..37d4d986cc0c 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/select-cmp.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/select-cmp.mir
@@ -12,7 +12,7 @@ body: |
; CHECK-LABEL: name: cmp_imm_32
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri [[COPY]], 42, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 42, 0, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
; CHECK: $w0 = COPY [[CSINCWr]]
; CHECK: RET_ReallyLR implicit $w0
@@ -35,7 +35,7 @@ body: |
; CHECK-LABEL: name: cmp_imm_64
; CHECK: liveins: $x0
; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
- ; CHECK: $xzr = SUBSXri [[COPY]], 42, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[COPY]], 42, 0, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
; CHECK: $w0 = COPY [[CSINCWr]]
; CHECK: RET_ReallyLR implicit $w0
@@ -82,7 +82,7 @@ body: |
; CHECK-LABEL: name: cmp_imm_lookthrough
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri [[COPY]], 42, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 42, 0, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
; CHECK: $w0 = COPY [[CSINCWr]]
; CHECK: RET_ReallyLR implicit $w0
@@ -105,7 +105,7 @@ body: |
; CHECK-LABEL: name: cmp_imm_lookthrough_bad_trunc
; CHECK: liveins: $w0
; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri [[COPY]], 0, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 0, 0, implicit-def $nzcv
; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
; CHECK: $w0 = COPY [[CSINCWr]]
; CHECK: RET_ReallyLR implicit $w0
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt-constrain.mir b/llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt-constrain.mir
index 6df6573b3533..440a03173c83 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt-constrain.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt-constrain.mir
@@ -26,7 +26,7 @@ body: |
; CHECK: [[DEF:%[0-9]+]]:gpr64common = IMPLICIT_DEF
; CHECK: [[LDRBBui:%[0-9]+]]:gpr32 = LDRBBui [[DEF]], 0 :: (load 1)
; CHECK: [[SUBREG_TO_REG:%[0-9]+]]:gpr64common = SUBREG_TO_REG 0, [[LDRBBui]], %subreg.sub_32
- ; CHECK: $xzr = SUBSXri [[SUBREG_TO_REG]], 8, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[SUBREG_TO_REG]], 8, 0, implicit-def $nzcv
; CHECK: Bcc 8, %bb.3, implicit $nzcv
; CHECK: bb.1:
; CHECK: successors: %bb.2(0x40000000), %bb.3(0x40000000)
@@ -35,6 +35,7 @@ body: |
; CHECK: BR %6
; CHECK: bb.2:
; CHECK: successors: %bb.3(0x80000000)
+ ; CHECK: B %bb.3
; CHECK: bb.3:
; CHECK: RET_ReallyLR
bb.1:
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir b/llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir
index ae7d90769f99..6b84c6d10843 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/select-jump-table-brjt.mir
@@ -60,7 +60,7 @@ body: |
; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $wzr
; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 4, 0, implicit-def $nzcv
; CHECK: [[SUBREG_TO_REG:%[0-9]+]]:gpr64common = SUBREG_TO_REG 0, [[SUBSWri]], %subreg.sub_32
- ; CHECK: $xzr = SUBSXri [[SUBREG_TO_REG]], 71, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[SUBREG_TO_REG]], 71, 0, implicit-def $nzcv
; CHECK: Bcc 8, %bb.4, implicit $nzcv
; CHECK: bb.1.entry:
; CHECK: successors: %bb.3(0x2aaaaaab), %bb.4(0x2aaaaaab), %bb.2(0x2aaaaaab)
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/select-select.mir b/llvm/test/CodeGen/AArch64/GlobalISel/select-select.mir
index c3a56c42a096..3fac860766c3 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/select-select.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/select-select.mir
@@ -20,7 +20,7 @@ body: |
; CHECK: [[COPY2:%[0-9]+]]:fpr32 = COPY $s1
; CHECK: [[COPY3:%[0-9]+]]:fpr32 = COPY [[COPY]]
; CHECK: [[COPY4:%[0-9]+]]:gpr32 = COPY [[COPY3]]
- ; CHECK: $wzr = ANDSWri [[COPY4]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY4]], 0, implicit-def $nzcv
; CHECK: [[FCSELSrrr:%[0-9]+]]:fpr32 = FCSELSrrr [[COPY1]], [[COPY2]], 1, implicit $nzcv
; CHECK: $s0 = COPY [[FCSELSrrr]]
; CHECK: RET_ReallyLR implicit $s0
@@ -52,7 +52,7 @@ body: |
; CHECK: [[COPY2:%[0-9]+]]:fpr64 = COPY $d1
; CHECK: [[COPY3:%[0-9]+]]:fpr32 = COPY [[COPY]]
; CHECK: [[COPY4:%[0-9]+]]:gpr32 = COPY [[COPY3]]
- ; CHECK: $wzr = ANDSWri [[COPY4]], 0, implicit-def $nzcv
+ ; CHECK: [[ANDSWri:%[0-9]+]]:gpr32 = ANDSWri [[COPY4]], 0, implicit-def $nzcv
; CHECK: [[FCSELDrrr:%[0-9]+]]:fpr64 = FCSELDrrr [[COPY1]], [[COPY2]], 1, implicit $nzcv
; CHECK: $d0 = COPY [[FCSELDrrr]]
; CHECK: RET_ReallyLR implicit $d0
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/select.mir b/llvm/test/CodeGen/AArch64/GlobalISel/select.mir
index a2a41a8aaa31..a75d1784e1ca 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/select.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/select.mir
@@ -284,11 +284,11 @@ registers:
- { id: 9, class: gpr }
# CHECK: body:
-# CHECK: $wzr = ANDSWri %10, 0, implicit-def $nzcv
+# CHECK: ANDSWri %10, 0, implicit-def $nzcv
# CHECK: %3:gpr32 = CSELWr %1, %2, 1, implicit $nzcv
-# CHECK: $wzr = ANDSWri %10, 0, implicit-def $nzcv
+# CHECK: ANDSWri %10, 0, implicit-def $nzcv
# CHECK: %6:gpr64 = CSELXr %4, %5, 1, implicit $nzcv
-# CHECK: $wzr = ANDSWri %10, 0, implicit-def $nzcv
+# CHECK: ANDSWri %10, 0, implicit-def $nzcv
# CHECK: %9:gpr64 = CSELXr %7, %8, 1, implicit $nzcv
body: |
bb.0:
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/tbnz-slt.mir b/llvm/test/CodeGen/AArch64/GlobalISel/tbnz-slt.mir
index a01fe760085a..2be18832a0e5 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/tbnz-slt.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/tbnz-slt.mir
@@ -71,7 +71,7 @@ body: |
; CHECK: bb.0:
; CHECK: successors: %bb.0(0x40000000), %bb.1(0x40000000)
; CHECK: %copy:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri %copy, 1, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri %copy, 1, 0, implicit-def $nzcv
; CHECK: Bcc 11, %bb.1, implicit $nzcv
; CHECK: B %bb.0
; CHECK: bb.1:
@@ -99,7 +99,7 @@ body: |
; CHECK: bb.0:
; CHECK: successors: %bb.0(0x40000000), %bb.1(0x40000000)
; CHECK: %copy:gpr64 = COPY $x0
- ; CHECK: $xzr = ANDSXri %copy, 8000, implicit-def $nzcv
+ ; CHECK: [[ANDSXri:%[0-9]+]]:gpr64 = ANDSXri %copy, 8000, implicit-def $nzcv
; CHECK: %cmp:gpr32 = CSINCWr $wzr, $wzr, 10, implicit $nzcv
; CHECK: TBNZW %cmp, 0, %bb.1
; CHECK: B %bb.0
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/tbz-sgt.mir b/llvm/test/CodeGen/AArch64/GlobalISel/tbz-sgt.mir
index 16b8ff5e6a8f..249807a285f0 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/tbz-sgt.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/tbz-sgt.mir
@@ -71,7 +71,7 @@ body: |
; CHECK: bb.0:
; CHECK: successors: %bb.0(0x40000000), %bb.1(0x40000000)
; CHECK: %copy:gpr32sp = COPY $w0
- ; CHECK: $wzr = SUBSWri %copy, 1, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri %copy, 1, 0, implicit-def $nzcv
; CHECK: Bcc 12, %bb.1, implicit $nzcv
; CHECK: B %bb.0
; CHECK: bb.1:
@@ -100,7 +100,7 @@ body: |
; CHECK: successors: %bb.0(0x40000000), %bb.1(0x40000000)
; CHECK: %copy:gpr64 = COPY $x0
; CHECK: %and:gpr64sp = ANDXri %copy, 8000
- ; CHECK: $xzr = SUBSXri %and, 0, 0, implicit-def $nzcv
+ ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri %and, 0, 0, implicit-def $nzcv
; CHECK: Bcc 10, %bb.1, implicit $nzcv
; CHECK: B %bb.0
; CHECK: bb.1:
More information about the llvm-commits
mailing list