Index: llvm/include/llvm/CodeGen/StackMaps.h =================================================================== --- llvm/include/llvm/CodeGen/StackMaps.h +++ llvm/include/llvm/CodeGen/StackMaps.h @@ -243,6 +243,14 @@ unsigned getGCPointerMap(SmallVectorImpl> &GCMap); + /// Return true if Reg is used only in operands which can be folded to + /// stack usage. + bool isFoldableReg(Register Reg) const; + + /// Return true if Reg is used only in operands of MI which can be folded to + /// stack usage and MI is a statepoint instruction. + static bool isFoldableReg(const MachineInstr *MI, Register Reg); + private: const MachineInstr *MI; unsigned NumDefs; Index: llvm/lib/CodeGen/SplitKit.h =================================================================== --- llvm/lib/CodeGen/SplitKit.h +++ llvm/lib/CodeGen/SplitKit.h @@ -217,6 +217,13 @@ using BlockPtrSet = SmallPtrSet; + /// getSingleUsePreferingReg - if there is only one use in BI return it. + /// if there are many but only one of them prefers register then return it. + /// Otherwise return invalid SlotIndex. + /// And example of use which does not prefer register is a STATEPOINT + /// instruction which is perfectly fine to use stack slot for var arg area. + SlotIndex getSingleUsePreferingReg(const BlockInfo &BI) const; + /// shouldSplitSingleBlock - Returns true if it would help to create a local /// live range for the instructions in BI. There is normally no benefit to /// creating a live range for a single instruction, but it does enable Index: llvm/lib/CodeGen/SplitKit.cpp =================================================================== --- llvm/lib/CodeGen/SplitKit.cpp +++ llvm/lib/CodeGen/SplitKit.cpp @@ -24,6 +24,7 @@ #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineOperand.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/CodeGen/StackMaps.h" #include "llvm/CodeGen/TargetInstrInfo.h" #include "llvm/CodeGen/TargetOpcodes.h" #include "llvm/CodeGen/TargetRegisterInfo.h" @@ -1572,23 +1573,61 @@ //===----------------------------------------------------------------------===// // Single Block Splitting //===----------------------------------------------------------------------===// +SlotIndex SplitAnalysis::getSingleUsePreferingReg(const BlockInfo &BI) const { + if (BI.isOneInstr()) + return BI.FirstInstr; + // Quick check, BI.FirstInstr and BI.LastInstr are different instructions. + // If none of them is STATEPOINT then we have more than one instruction. + MachineInstr *FI = LIS.getInstructionFromIndex(BI.FirstInstr); + MachineInstr *LI = LIS.getInstructionFromIndex(BI.LastInstr); + if ((FI->getOpcode() != TargetOpcode::STATEPOINT) && + (LI->getOpcode() != TargetOpcode::STATEPOINT)) + return SlotIndex(); + // ok, we need to check all uses in the current basic block. + // UseSlots is sorted vector, so we can use lower_bound to find first index + // in the current basic block. + auto It = llvm::lower_bound(UseSlots, BI.FirstInstr); + assert(*It == BI.FirstInstr && "First index should be found"); + SlotIndex Result; + Register CurReg = CurLI->reg(); + for (; It != UseSlots.end() && *It <= BI.LastInstr; ++It) { + SlotIndex SI = *It; + if (StatepointOpers::isFoldableReg(LIS.getInstructionFromIndex(SI), CurReg)) + continue; + // We found use of register which is unfoldable. If this is a second time + // report there is no single use. + if (Result) + return SlotIndex(); + // Keep the first use. + Result = SI; + } + // If Result is none, it means we have only one statepoint instruction with + // foldable uses. Just report it. + return Result ? Result : BI.FirstInstr; +} bool SplitAnalysis::shouldSplitSingleBlock(const BlockInfo &BI, bool SingleInstrs) const { + SlotIndex FirstInst = getSingleUsePreferingReg(BI); // Always split for multiple instructions. - if (!BI.isOneInstr()) + if (!FirstInst) return true; // Don't split for single instructions unless explicitly requested. if (!SingleInstrs) return false; + // If the single instruction is a statepoint which ok to accept operands in + // stack slot then do not create a split. + if (StatepointOpers::isFoldableReg(LIS.getInstructionFromIndex(FirstInst), + CurLI->reg())) + return false; // Splitting a live-through range always makes progress. if (BI.LiveIn && BI.LiveOut) return true; // No point in isolating a copy. It has no register class constraints. - if (LIS.getInstructionFromIndex(BI.FirstInstr)->isCopyLike()) + if (LIS.getInstructionFromIndex(FirstInst)->isCopyLike()) return false; // Finally, don't isolate an end point that was created by earlier splits. - return isOriginalEndpoint(BI.FirstInstr); + return isOriginalEndpoint(FirstInst); } void SplitEditor::splitSingleBlock(const SplitAnalysis::BlockInfo &BI) { Index: llvm/lib/CodeGen/StackMaps.cpp =================================================================== --- llvm/lib/CodeGen/StackMaps.cpp +++ llvm/lib/CodeGen/StackMaps.cpp @@ -146,6 +146,23 @@ return GCMapSize; } +bool StatepointOpers::isFoldableReg(Register Reg) const { + unsigned FoldableAreaStart = getVarIdx(); + for (const MachineOperand &MO : MI->uses()) { + if (MI->getOperandNo(&MO) >= FoldableAreaStart) + break; + if (MO.isReg() && MO.getReg() == Reg) + return false; + } + return true; +} + +bool StatepointOpers::isFoldableReg(const MachineInstr *MI, Register Reg) { + if (MI->getOpcode() != TargetOpcode::STATEPOINT) + return false; + return StatepointOpers(MI).isFoldableReg(Reg); +} + StackMaps::StackMaps(AsmPrinter &AP) : AP(AP) { if (StackMapVersion != 3) llvm_unreachable("Unsupported stackmap version!"); Index: llvm/test/CodeGen/AArch64/regalloc-last-chance-recolor-with-split.mir =================================================================== --- llvm/test/CodeGen/AArch64/regalloc-last-chance-recolor-with-split.mir +++ llvm/test/CodeGen/AArch64/regalloc-last-chance-recolor-with-split.mir @@ -271,31 +271,30 @@ ; CHECK-NEXT: successors: %bb.1(0x80000000), %bb.2(0x00000000) ; CHECK-NEXT: liveins: $x0 ; CHECK-NEXT: {{ $}} - ; CHECK-NEXT: renamable $x19 = COPY $x0 + ; CHECK-NEXT: STRXui $x0, %stack.0, 0 :: (store (s64) into %stack.0) ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: dead $w1 = MOVi32imm 526, implicit-def $x1 ; CHECK-NEXT: dead $w2 = MOVi32imm 2, implicit-def $x2 - ; CHECK-NEXT: renamable $w21 = MOVi32imm 2, implicit-def $x21 - ; CHECK-NEXT: renamable $x19 = STATEPOINT 2882400000, 0, 4, @bar, undef $x0, $x1, $x2, undef $x3, 2, 0, 2, 4, 2, 39, 2, 0, 2, 1, 2, 0, 2, 42, 2, 2, 2, 14, 2, 0, 2, 3, 2, 400, 2, 3, 2, 400, 2, 0, killed renamable $x19, 2, 7, 2, 0, 2, 3, 2, 95, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, renamable $x19(tied-def 0), 2, 0, 2, 1, 0, 0, csr_aarch64_aapcs, implicit-def $sp, implicit-def $x0, implicit-def dead early-clobber $lr + ; CHECK-NEXT: renamable $w19 = MOVi32imm 2, implicit-def $x19 + ; CHECK-NEXT: STATEPOINT 2882400000, 0, 4, @bar, undef $x0, $x1, $x2, undef $x3, 2, 0, 2, 4, 2, 39, 2, 0, 2, 1, 2, 0, 2, 42, 2, 2, 2, 14, 2, 0, 2, 3, 2, 400, 2, 3, 2, 400, 2, 0, 1, 8, %stack.0, 0, 2, 7, 2, 0, 2, 3, 2, 95, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, 1, 8, %stack.0, 0, 2, 0, 2, 1, 0, 0, csr_aarch64_aapcs, implicit-def $sp, implicit-def $x0, implicit-def dead early-clobber $lr :: (load store (s64) on %stack.0) ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: renamable $x20 = COPY $x0 ; CHECK-NEXT: DMB 11 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp - ; CHECK-NEXT: renamable $x20, renamable $x19 = STATEPOINT 2, 4, 1, undef renamable $x0, undef $x0, 2, 0, 2, 4, 2, 35, 2, 0, 2, 2, 2, 0, 2, 48, 2, 0, 2, 14, 2, 0, 2, 0, killed renamable $x19, 2, 7, 2, 0, 2, 3, 2, 95, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 2, renamable $x20(tied-def 0), renamable $x19(tied-def 1), 2, 0, 2, 2, 0, 0, 1, 1, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead $x0, implicit-def dead early-clobber $lr + ; CHECK-NEXT: renamable $x20 = STATEPOINT 2, 4, 1, undef renamable $x0, undef $x0, 2, 0, 2, 4, 2, 35, 2, 0, 2, 2, 2, 0, 2, 48, 2, 0, 2, 14, 2, 0, 2, 0, 1, 8, %stack.0, 0, 2, 7, 2, 0, 2, 3, 2, 95, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 2, renamable $x20(tied-def 0), 1, 8, %stack.0, 0, 2, 0, 2, 2, 0, 0, 1, 1, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead $x0, implicit-def dead early-clobber $lr :: (load store (s64) on %stack.0) ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: $w1 = MOVi32imm 33333 - ; CHECK-NEXT: renamable $x20, renamable $x19 = STATEPOINT 2, 4, 2, undef renamable $x0, undef $x0, $w1, 2, 0, 2, 0, 2, 41, 2, 0, 2, 2, 2, 0, 2, 73, 2, 3, 2, 14, 2, 0, 2, 3, 2, 95, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, killed renamable $x19, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 3, renamable $x20(tied-def 0), renamable $x19(tied-def 1), 2, 4278124286, 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead $w0, implicit-def dead early-clobber $lr + ; CHECK-NEXT: renamable $x20 = STATEPOINT 2, 4, 2, undef renamable $x0, undef $x0, $w1, 2, 0, 2, 0, 2, 41, 2, 0, 2, 2, 2, 0, 2, 73, 2, 3, 2, 14, 2, 0, 2, 3, 2, 95, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 1, 8, %stack.0, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 3, renamable $x20(tied-def 0), 1, 8, %stack.0, 0, 2, 4278124286, 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead $w0, implicit-def dead early-clobber $lr :: (load store (s64) on %stack.0) ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp - ; CHECK-NEXT: renamable $x20, renamable $x19 = STATEPOINT 2, 4, 2, undef renamable $x0, undef $x0, undef $w1, 2, 0, 2, 0, 2, 39, 2, 0, 2, 2, 2, 0, 2, 78, 2, 2, 2, 14, 2, 0, 2, 3, 2, 95, 2, 0, 2, 4278124286, 2, 0, killed renamable $x19, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 3, renamable $x20(tied-def 0), renamable $x19(tied-def 1), 2, 4278124286, 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead $w0, implicit-def dead early-clobber $lr + ; CHECK-NEXT: renamable $x20 = STATEPOINT 2, 4, 2, undef renamable $x0, undef $x0, undef $w1, 2, 0, 2, 0, 2, 39, 2, 0, 2, 2, 2, 0, 2, 78, 2, 2, 2, 14, 2, 0, 2, 3, 2, 95, 2, 0, 2, 4278124286, 2, 0, 1, 8, %stack.0, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 3, renamable $x20(tied-def 0), 1, 8, %stack.0, 0, 2, 4278124286, 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead $w0, implicit-def dead early-clobber $lr :: (load store (s64) on %stack.0) ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp - ; CHECK-NEXT: renamable $x20, renamable $x19 = STATEPOINT 2, 4, 2, undef renamable $x0, undef $x0, undef $w1, 2, 0, 2, 0, 2, 37, 2, 0, 2, 2, 2, 0, 2, 83, 2, 1, 2, 14, 2, 0, 2, 3, 2, 95, 2, 0, killed renamable $x19, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 2, renamable $x20(tied-def 0), renamable $x19(tied-def 1), 2, 0, 2, 2, 0, 0, 1, 1, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead $w0, implicit-def dead early-clobber $lr + ; CHECK-NEXT: renamable $x20 = STATEPOINT 2, 4, 2, undef renamable $x0, undef $x0, undef $w1, 2, 0, 2, 0, 2, 37, 2, 0, 2, 2, 2, 0, 2, 83, 2, 1, 2, 14, 2, 0, 2, 3, 2, 95, 2, 0, 1, 8, %stack.0, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 2, renamable $x20(tied-def 0), 1, 8, %stack.0, 0, 2, 0, 2, 2, 0, 0, 1, 1, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead $w0, implicit-def dead early-clobber $lr :: (load store (s64) on %stack.0) ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp - ; CHECK-NEXT: renamable $x19, dead renamable $x20 = STATEPOINT 2, 4, 1, undef renamable $x0, undef $w0, 2, 0, 2, 0, 2, 35, 2, 0, 2, 2, 2, 0, 2, 95, 2, 0, 2, 14, 2, 0, 2, 0, killed renamable $x19, 2, 7, 2, 0, 2, 3, 2, 95, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 2, renamable $x19(tied-def 0), renamable $x20(tied-def 1), 2, 0, 2, 2, 0, 0, 1, 1, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead early-clobber $lr - ; CHECK-NEXT: STRXui killed renamable $x19, %stack.0, 0 :: (store (s64) into %stack.0) + ; CHECK-NEXT: dead renamable $x20 = STATEPOINT 2, 4, 1, undef renamable $x0, undef $w0, 2, 0, 2, 0, 2, 35, 2, 0, 2, 2, 2, 0, 2, 95, 2, 0, 2, 14, 2, 0, 2, 0, 1, 8, %stack.0, 0, 2, 7, 2, 0, 2, 3, 2, 95, 2, 7, 2, 0, 2, 3, 2, -11, 2, 3, 2, -8280, 2, 3, 2, 45, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 2, 1, 8, %stack.0, 0, renamable $x20(tied-def 0), 2, 0, 2, 2, 0, 0, 1, 1, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead early-clobber $lr :: (load store (s64) on %stack.0) ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: CBNZW $wzr, %bb.2 ; CHECK-NEXT: B %bb.1 @@ -303,11 +302,11 @@ ; CHECK-NEXT: bb.1.bb27.preheader: ; CHECK-NEXT: successors: %bb.3(0x80000000) ; CHECK-NEXT: {{ $}} - ; CHECK-NEXT: renamable $x24 = LDRXui undef renamable $x8, 0 :: (load unordered (s64) from `i64 addrspace(1)* undef`, addrspace 1) + ; CHECK-NEXT: renamable $x20 = LDRXui undef renamable $x8, 0 :: (load unordered (s64) from `i64 addrspace(1)* undef`, addrspace 1) ; CHECK-NEXT: renamable $w21 = MOVi32imm -8280 ; CHECK-NEXT: renamable $w23 = MOVi32imm -6 ; CHECK-NEXT: renamable $w25 = MOVi32imm 3, implicit-def $x25 - ; CHECK-NEXT: renamable $w20 = MOVi32imm 2143289344 + ; CHECK-NEXT: renamable $w24 = MOVi32imm 2143289344 ; CHECK-NEXT: renamable $x22 = IMPLICIT_DEF ; CHECK-NEXT: dead renamable $x8 = IMPLICIT_DEF ; CHECK-NEXT: renamable $x26 = IMPLICIT_DEF @@ -322,16 +321,16 @@ ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.2.bb23: ; CHECK-NEXT: successors: - ; CHECK-NEXT: liveins: $x21 + ; CHECK-NEXT: liveins: $x19 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp - ; CHECK-NEXT: renamable $w19 = MOVi32imm 95 - ; CHECK-NEXT: STATEPOINT 2882400000, 0, 0, @wombat, 2, 0, 2, 0, 2, 39, 2, 0, 2, 1, 2, 0, 2, 117, 2, 2, 2, 14, 2, 0, 2, 3, 2, 3, 2, 3, 2, 109, 2, 0, 1, 8, %stack.0, 0, 2, 7, 2, 0, 2, 3, killed renamable $w19, 2, 3, renamable $w21, 2, 3, 2, 3, 2, 3, 2, -8280, 2, 7, 2, 0, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 2, 1, 8, %stack.0, 0, 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead early-clobber $lr, implicit killed $x21 :: (load store (s64) on %stack.0) + ; CHECK-NEXT: renamable $w20 = MOVi32imm 95 + ; CHECK-NEXT: STATEPOINT 2882400000, 0, 0, @wombat, 2, 0, 2, 0, 2, 39, 2, 0, 2, 1, 2, 0, 2, 117, 2, 2, 2, 14, 2, 0, 2, 3, 2, 3, 2, 3, 2, 109, 2, 0, 1, 8, %stack.0, 0, 2, 7, 2, 0, 2, 3, killed renamable $w20, 2, 3, renamable $w19, 2, 3, 2, 3, 2, 3, 2, -8280, 2, 7, 2, 0, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 5, 2, 7, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 2, 1, 8, %stack.0, 0, 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead early-clobber $lr, implicit killed $x19 :: (load store (s64) on %stack.0) ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.3.bb27: ; CHECK-NEXT: successors: %bb.4(0x80000000), %bb.13(0x00000000) - ; CHECK-NEXT: liveins: $w20, $w21, $w23, $x10, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $w21, $w23, $w24, $x10, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: renamable $fp = nuw nsw ADDXri renamable $x25, 1, 0 ; CHECK-NEXT: CBNZW $wzr, %bb.13 @@ -339,32 +338,30 @@ ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.4.bb41: ; CHECK-NEXT: successors: %bb.5(0x7ffff777), %bb.6(0x00000889) - ; CHECK-NEXT: liveins: $fp, $w20, $w21, $w23, $x10, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $fp, $w21, $w23, $w24, $x10, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: CBZW $wzr, %bb.6 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.5: ; CHECK-NEXT: successors: %bb.7(0x80000000) - ; CHECK-NEXT: liveins: $fp, $w20, $w23, $x10, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $fp, $w23, $w24, $x10, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: B %bb.7 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.6.bb42: ; CHECK-NEXT: successors: %bb.7(0x80000000) - ; CHECK-NEXT: liveins: $fp, $w21, $w23, $x24, $x25, $x27 + ; CHECK-NEXT: liveins: $fp, $w21, $w23, $w24, $x20, $x25, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: renamable $x19 = LDRXui %stack.0, 0 :: (load (s64) from %stack.0) + ; CHECK-NEXT: renamable $w22 = MOVi32imm 2, implicit-def $x22 ; CHECK-NEXT: renamable $w26 = MOVi32imm 95 - ; CHECK-NEXT: renamable $x22 = LDRXui %stack.1, 0 :: (load (s64) from %stack.1) - ; CHECK-NEXT: renamable $w20 = MOVi32imm 2, implicit-def $x20 - ; CHECK-NEXT: renamable $x27, renamable $x22, dead renamable $x19 = STATEPOINT 2882400000, 0, 0, @wombat, 2, 0, 2, 0, 2, 35, 2, 0, 2, 1, 2, 0, 2, 125, 2, 0, 2, 14, 2, 0, 2, 0, killed renamable $x19, 2, 7, 2, 0, 2, 3, killed renamable $w26, 2, 3, renamable $w20, 2, 3, 2, 4278124286, 2, 3, killed renamable $w21, 2, 7, 2, 0, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 2, 2, 7, 2, 0, 2, 3, 2, 4278124286, 2, 0, killed renamable $x22, 2, 7, 2, 0, 2, 3, killed renamable $x27(tied-def 0), renamable $x22(tied-def 1), renamable $x19(tied-def 2), 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead early-clobber $lr, implicit killed $x20 - ; CHECK-NEXT: renamable $w20 = MOVi32imm 2143289344 + ; CHECK-NEXT: renamable $x27, dead renamable $x19 = STATEPOINT 2882400000, 0, 0, @wombat, 2, 0, 2, 0, 2, 35, 2, 0, 2, 1, 2, 0, 2, 125, 2, 0, 2, 14, 2, 0, 2, 0, killed renamable $x19, 2, 7, 2, 0, 2, 3, killed renamable $w26, 2, 3, renamable $w22, 2, 3, 2, 4278124286, 2, 3, killed renamable $w21, 2, 7, 2, 0, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 2, 2, 7, 2, 0, 2, 3, 2, 4278124286, 2, 0, 1, 8, %stack.1, 0, 2, 7, 2, 0, 2, 3, killed renamable $x27(tied-def 0), 1, 8, %stack.1, 0, renamable $x19(tied-def 1), 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead early-clobber $lr, implicit killed $x22 :: (load store (s64) on %stack.1) ; CHECK-NEXT: renamable $w10 = MOVi32imm 2, implicit-def $x10 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: renamable $x19 = COPY $xzr - ; CHECK-NEXT: STRXui renamable $x22, %stack.1, 0 :: (store (s64) into %stack.1) - ; CHECK-NEXT: dead renamable $x8 = nuw ADDXri killed renamable $x22, 24, 0 + ; CHECK-NEXT: renamable $x8 = LDRXui %stack.1, 0 :: (load (s64) from %stack.1) + ; CHECK-NEXT: dead renamable $x8 = nuw ADDXri killed renamable $x8, 24, 0 ; CHECK-NEXT: renamable $x22 = IMPLICIT_DEF ; CHECK-NEXT: renamable $x26 = IMPLICIT_DEF ; CHECK-NEXT: renamable $x8 = IMPLICIT_DEF @@ -372,19 +369,19 @@ ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.7.bb48: ; CHECK-NEXT: successors: %bb.8(0x80000000) - ; CHECK-NEXT: liveins: $fp, $w20, $w23, $x10, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $fp, $w23, $w24, $x10, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.8.bb79: ; CHECK-NEXT: successors: %bb.9(0x04000000), %bb.8(0x7c000000) - ; CHECK-NEXT: liveins: $fp, $w20, $w23, $x10, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $fp, $w23, $w24, $x10, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: CBNZW $wzr, %bb.8 ; CHECK-NEXT: B %bb.9 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.9.bb81: ; CHECK-NEXT: successors: %bb.11(0x78787f1d), %bb.10(0x078780e3) - ; CHECK-NEXT: liveins: $fp, $w20, $w23, $x10, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $fp, $w23, $w24, $x10, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: STRXui $xzr, renamable $x22, 0 :: (store unordered (s64), addrspace 1) ; CHECK-NEXT: CBNZW $wzr, %bb.11 @@ -392,7 +389,7 @@ ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.10.bb82: ; CHECK-NEXT: successors: %bb.11(0x80000000) - ; CHECK-NEXT: liveins: $fp, $w20, $w23, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $fp, $w23, $w24, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: BL @blam.1, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp @@ -401,13 +398,13 @@ ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.11.bb83: ; CHECK-NEXT: successors: %bb.12(0x7ffff777), %bb.17(0x00000889) - ; CHECK-NEXT: liveins: $fp, $w20, $w23, $x10, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $fp, $w23, $w24, $x10, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: CBZW $wzr, %bb.17 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.12: ; CHECK-NEXT: successors: %bb.18(0x80000000) - ; CHECK-NEXT: liveins: $fp, $w20, $w23, $x10, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $fp, $w23, $w24, $x10, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: B %bb.18 ; CHECK-NEXT: {{ $}} @@ -427,7 +424,7 @@ ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.15.bb90: - ; CHECK-NEXT: successors: + ; CHECK-NEXT: successors:{{ $}} ; CHECK-NEXT: liveins: $fp, $w21, $x10 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp @@ -446,37 +443,34 @@ ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.17.bb96: ; CHECK-NEXT: successors: %bb.18(0x80000000) - ; CHECK-NEXT: liveins: $fp, $w23, $x24, $x25, $x27 + ; CHECK-NEXT: liveins: $fp, $w23, $w24, $x20, $x25, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp ; CHECK-NEXT: renamable $x19 = LDRXui %stack.0, 0 :: (load (s64) from %stack.0) ; CHECK-NEXT: renamable $w21 = MOVi32imm 2, implicit-def $x21 ; CHECK-NEXT: renamable $w22 = MOVi32imm 95 - ; CHECK-NEXT: renamable $x20 = LDRXui %stack.1, 0 :: (load (s64) from %stack.1) - ; CHECK-NEXT: renamable $x26 = LDRXui %stack.2, 0 :: (load (s64) from %stack.2) - ; CHECK-NEXT: renamable $x26, renamable $x27, renamable $x20, dead renamable $x19 = STATEPOINT 2882400000, 0, 0, @wombat, 2, 0, 2, 0, 2, 35, 2, 0, 2, 1, 2, 0, 2, 250, 2, 0, 2, 14, 2, 0, 2, 0, killed renamable $x19, 2, 7, 2, 0, 2, 3, killed renamable $w22, 2, 3, renamable $w21, 2, 3, 2, 4278124286, 2, 3, renamable $w21, 2, 7, 2, 0, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 0, 2, 7, 2, 0, 2, 3, 2, 4278124286, 2, 0, killed renamable $x20, 2, 7, 2, 0, 2, 4, killed renamable $x26(tied-def 0), killed renamable $x27(tied-def 1), renamable $x20(tied-def 2), renamable $x19(tied-def 3), 2, 0, 2, 4, 0, 0, 1, 1, 2, 2, 3, 3, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead early-clobber $lr, implicit killed $x21 + ; CHECK-NEXT: renamable $x27, dead renamable $x19 = STATEPOINT 2882400000, 0, 0, @wombat, 2, 0, 2, 0, 2, 35, 2, 0, 2, 1, 2, 0, 2, 250, 2, 0, 2, 14, 2, 0, 2, 0, killed renamable $x19, 2, 7, 2, 0, 2, 3, killed renamable $w22, 2, 3, renamable $w21, 2, 3, 2, 4278124286, 2, 3, renamable $w21, 2, 7, 2, 0, 2, 3, 2, 230, 2, 7, 2, 0, 2, 4, 2, 0, 2, 7, 2, 0, 2, 3, 2, 4278124286, 2, 0, 1, 8, %stack.1, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.2, 0, killed renamable $x27(tied-def 0), 1, 8, %stack.1, 0, renamable $x19(tied-def 1), 2, 0, 2, 4, 0, 0, 1, 1, 2, 2, 3, 3, csr_aarch64_aapcs, implicit-def $sp, implicit-def dead early-clobber $lr, implicit killed $x21 :: (load store (s64) on %stack.1), (load store (s64) on %stack.2) ; CHECK-NEXT: renamable $w10 = MOVi32imm 2, implicit-def $x10 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp - ; CHECK-NEXT: STRXui renamable $x20, %stack.1, 0 :: (store (s64) into %stack.1) - ; CHECK-NEXT: dead renamable $x8 = nuw ADDXri killed renamable $x20, 24, 0 - ; CHECK-NEXT: renamable $w20 = MOVi32imm 2143289344 - ; CHECK-NEXT: STRXui renamable $x26, %stack.2, 0 :: (store (s64) into %stack.2) - ; CHECK-NEXT: renamable $x22 = nuw ADDXri killed renamable $x26, 848, 0 + ; CHECK-NEXT: renamable $x8 = LDRXui %stack.1, 0 :: (load (s64) from %stack.1) + ; CHECK-NEXT: dead renamable $x8 = nuw ADDXri killed renamable $x8, 24, 0 + ; CHECK-NEXT: renamable $x8 = LDRXui %stack.2, 0 :: (load (s64) from %stack.2) + ; CHECK-NEXT: renamable $x22 = nuw ADDXri killed renamable $x8, 848, 0 ; CHECK-NEXT: renamable $x26 = IMPLICIT_DEF ; CHECK-NEXT: renamable $x19 = IMPLICIT_DEF ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.18.bb105: ; CHECK-NEXT: successors: %bb.20(0x00000000), %bb.19(0x80000000) - ; CHECK-NEXT: liveins: $fp, $w20, $w23, $x10, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $fp, $w23, $w24, $x10, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} - ; CHECK-NEXT: STRWui renamable $w24, renamable $x19, 0 :: (store unordered (s32), addrspace 1) - ; CHECK-NEXT: STRWui renamable $w20, renamable $x26, 0 :: (store unordered (s32), align 8, addrspace 1) + ; CHECK-NEXT: STRWui renamable $w20, renamable $x19, 0 :: (store unordered (s32), addrspace 1) + ; CHECK-NEXT: STRWui renamable $w24, renamable $x26, 0 :: (store unordered (s32), align 8, addrspace 1) ; CHECK-NEXT: CBZX renamable $x27, %bb.20 ; CHECK-NEXT: B %bb.19 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: bb.19.bb115: ; CHECK-NEXT: successors: %bb.16(0x00000000), %bb.3(0x80000000) - ; CHECK-NEXT: liveins: $fp, $w20, $w23, $x10, $x19, $x22, $x24, $x25, $x26, $x27 + ; CHECK-NEXT: liveins: $fp, $w23, $w24, $x10, $x19, $x20, $x22, $x25, $x26, $x27 ; CHECK-NEXT: {{ $}} ; CHECK-NEXT: renamable $x8 = COPY $xzr ; CHECK-NEXT: renamable $w9 = LDRWui renamable $x8, 0 :: (load unordered (s32) from `i32 addrspace(1)* null`, addrspace 1) Index: llvm/test/CodeGen/X86/statepoint-invoke-ra.mir =================================================================== --- llvm/test/CodeGen/X86/statepoint-invoke-ra.mir +++ llvm/test/CodeGen/X86/statepoint-invoke-ra.mir @@ -12,37 +12,36 @@ # CHECK: %13:gr64 = MOV64rm $noreg, 1, $noreg, 0, $noreg :: (load (s64) from `i8 addrspace(1)* addrspace(1)* null`, addrspace 1) # CHECK: undef %33.sub_32bit:gr64_nosp = MOV32rm $noreg, 1, $noreg, 0, $noreg :: (load (s32) from `i32 addrspace(1)* null`, addrspace 1) # CHECK: %35:gr32 = MOV32rm %8, 1, $noreg, 96, $noreg :: (load (s32) from %ir.tmp4, addrspace 1) -# CHECK: %43:gr32 = MOV32rm %8, 1, $noreg, 160, $noreg :: (load (s32) from %ir.tmp6, addrspace 1) -# CHECK: %38:gr64 = MOV64rm undef %15:gr64, 1, $noreg, 0, $noreg :: (load (s64) from `i8 addrspace(1)* addrspace(1)* undef`, addrspace 1) -# CHECK: %40:gr32 = MOV32rm %8, 1, $noreg, 352, $noreg :: (load (s32) from %ir.tmp10, addrspace 1) +# CHECK: %42:gr32 = MOV32rm %8, 1, $noreg, 160, $noreg :: (load (s32) from %ir.tmp6, addrspace 1) +# CHECK: %37:gr64 = MOV64rm undef %15:gr64, 1, $noreg, 0, $noreg :: (load (s64) from `i8 addrspace(1)* addrspace(1)* undef`, addrspace 1) +# CHECK: MOV64mr %stack.7, 1, $noreg, 0, $noreg, %37 :: (store (s64) into %stack.7) +# CHECK: %39:gr32 = MOV32rm %8, 1, $noreg, 352, $noreg :: (load (s32) from %ir.tmp10, addrspace 1) # CHECK: %16:gr64 = MOV64rm %6, 1, $noreg, 96, $noreg :: (load (s64) from %ir.tmp13, addrspace 1) # CHECK: %17:gr64 = MOV64rm %6, 1, $noreg, 104, $noreg :: (load (s64) from %ir.tmp16, addrspace 1) -# CHECK: %45:gr32 = LEA64_32r %33, 1, $noreg, -1, $noreg +# CHECK: %5:gr32 = LEA64_32r %33, 1, $noreg, -1, $noreg # CHECK: MOV32mr %stack.1, 1, $noreg, 0, $noreg, %7 :: (store (s32) into %stack.1) -# CHECK: MOV32mr %stack.9, 1, $noreg, 0, $noreg, %45 :: (store (s32) into %stack.9) -# CHECK: MOV32mr %stack.0, 1, $noreg, 0, $noreg, %45 :: (store (s32) into %stack.0) +# CHECK: MOV32mr %stack.0, 1, $noreg, 0, $noreg, %5 :: (store (s32) into %stack.0) # CHECK: MOV32mr %stack.2, 1, $noreg, 0, $noreg, %33.sub_32bit :: (store (s32) into %stack.2) # CHECK: MOV32mr %stack.6, 1, $noreg, 0, $noreg, %35 :: (store (s32) into %stack.6) # CHECK: MOV32mr %stack.3, 1, $noreg, 0, $noreg, %35 :: (store (s32) into %stack.3) -# CHECK: MOV32mr %stack.8, 1, $noreg, 0, $noreg, %43 :: (store (s32) into %stack.8) -# CHECK: MOV32mr %stack.4, 1, $noreg, 0, $noreg, %43 :: (store (s32) into %stack.4) -# CHECK: MOV32mr %stack.7, 1, $noreg, 0, $noreg, %40 :: (store (s32) into %stack.7) -# CHECK: MOV32mr %stack.5, 1, $noreg, 0, $noreg, %40 :: (store (s32) into %stack.5) +# CHECK: MOV32mr %stack.9, 1, $noreg, 0, $noreg, %42 :: (store (s32) into %stack.9) +# CHECK: MOV32mr %stack.4, 1, $noreg, 0, $noreg, %42 :: (store (s32) into %stack.4) +# CHECK: MOV32mr %stack.8, 1, $noreg, 0, $noreg, %39 :: (store (s32) into %stack.8) +# CHECK: MOV32mr %stack.5, 1, $noreg, 0, $noreg, %39 :: (store (s32) into %stack.5) # CHECK: EH_LABEL # CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp # CHECK: $edi = MOV32r0 implicit-def dead $eflags # CHECK: dead $esi = MOV32r0 implicit-def dead $eflags, implicit-def $rsi # CHECK: $ecx = COPY %7 # CHECK: $r8d = MOV32r0 implicit-def dead $eflags -# CHECK: %37:gr64 = COPY %38 -# CHECK: %17:gr64, %16:gr64, %13:gr64, %37:gr64 = STATEPOINT 1, 16, 5, undef %23:gr64, $edi, $rsi, undef $edx, $ecx, $r8d, 2, 0, 2, 0, 2, 11, 1, 4, %stack.0, 0, %13, 1, 4, %stack.1, 0, 1, 4, %stack.2, 0, 1, 4, %stack.3, 0, 1, 4, %stack.4, 0, 1, 4, %stack.2, 0, %37, 1, 4, %stack.5, 0, %16, %17, 2, 4, %17(tied-def 0), %16(tied-def 1), %13(tied-def 2), %37(tied-def 3), 2, 0, 2, 4, 0, 0, 1, 1, 2, 2, 3, 3, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax :: (volatile load store (s32) on %stack.0), (volatile load store (s32) on %stack.1), (volatile load store (s32) on %stack.2), (volatile load store (s32) on %stack.3), (volatile load store (s32) on %stack.4), (volatile load store (s32) on %stack.5) +# CHECK: %17:gr64, %16:gr64, %13:gr64 = STATEPOINT 1, 16, 5, undef %23:gr64, $edi, $rsi, undef $edx, $ecx, $r8d, 2, 0, 2, 0, 2, 11, 1, 4, %stack.0, 0, %13, 1, 4, %stack.1, 0, 1, 4, %stack.2, 0, 1, 4, %stack.3, 0, 1, 4, %stack.4, 0, 1, 4, %stack.2, 0, 1, 8, %stack.7, 0, 1, 4, %stack.5, 0, %16, %17, 2, 4, %17(tied-def 0), %16(tied-def 1), %13(tied-def 2), 1, 8, %stack.7, 0, 2, 0, 2, 4, 0, 0, 1, 1, 2, 2, 3, 3, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax :: (volatile load store (s32) on %stack.0), (volatile load store (s32) on %stack.1), (volatile load store (s32) on %stack.2), (volatile load store (s32) on %stack.3), (volatile load store (s32) on %stack.4), (volatile load store (s32) on %stack.5), (load store (s64) on %stack.7) # CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp # CHECK: EH_LABEL # CHECK: JMP_1 %bb.1 # CHECK: bb.1.bb21: # CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp # CHECK: $edi = MOV32ri 10 -# CHECK: dead %13:gr64, dead %16:gr64, dead %17:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @quux, $edi, 2, 0, 2, 2, 2, 10, 1, 4, %stack.9, 0, %13, %7, %33.sub_32bit, 1, 4, %stack.6, 0, 1, 4, %stack.8, 0, %33.sub_32bit, 1, 4, %stack.7, 0, %16, %17, 2, 3, %13(tied-def 0), %16(tied-def 1), %17(tied-def 2), 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp :: (load (s32) from %stack.6), (load (s32) from %stack.7), (load (s32) from %stack.8), (load (s32) from %stack.9) +# CHECK: dead %13:gr64, dead %16:gr64, dead %17:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @quux, $edi, 2, 0, 2, 2, 2, 10, %5, %13, %7, %33.sub_32bit, 1, 4, %stack.6, 0, 1, 4, %stack.9, 0, %33.sub_32bit, 1, 4, %stack.8, 0, %16, %17, 2, 3, %13(tied-def 0), %16(tied-def 1), %17(tied-def 2), 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp :: (load (s32) from %stack.6), (load (s32) from %stack.8), (load (s32) from %stack.9) # CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp # CHECK: RET 0 # CHECK: bb.2.bb26 (landing-pad): @@ -53,11 +52,11 @@ # CHECK: %36:gr32 = MOV32rm %stack.6, 1, $noreg, 0, $noreg :: (load (s32) from %stack.6) # CHECK: MOV32mr %stack.2, 1, $noreg, 0, $noreg, %36 :: (store (s32) into %stack.2) # CHECK: MOV32mr %stack.3, 1, $noreg, 0, $noreg, %33.sub_32bit :: (store (s32) into %stack.3) -# CHECK: %41:gr32 = MOV32rm %stack.7, 1, $noreg, 0, $noreg :: (load (s32) from %stack.7) -# CHECK: MOV32mr %stack.4, 1, $noreg, 0, $noreg, %41 :: (store (s32) into %stack.4) +# CHECK: %40:gr32 = MOV32rm %stack.8, 1, $noreg, 0, $noreg :: (load (s32) from %stack.8) +# CHECK: MOV32mr %stack.4, 1, $noreg, 0, $noreg, %40 :: (store (s32) into %stack.4) # CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp # CHECK: $edi = MOV32ri -271 -# CHECK: dead %37:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @quux, $edi, 2, 0, 2, 0, 2, 6, 1, 4, %stack.0, 0, 1, 4, %stack.1, 0, 1, 4, %stack.2, 0, 1, 4, %stack.3, 0, %37, 1, 4, %stack.4, 0, 2, 1, %37(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store (s32) on %stack.0), (volatile load store (s32) on %stack.1), (volatile load store (s32) on %stack.2), (volatile load store (s32) on %stack.3), (volatile load store (s32) on %stack.4) +# CHECK: STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @quux, $edi, 2, 0, 2, 0, 2, 6, 1, 4, %stack.0, 0, 1, 4, %stack.1, 0, 1, 4, %stack.2, 0, 1, 4, %stack.3, 0, 1, 8, %stack.7, 0, 1, 4, %stack.4, 0, 2, 1, 1, 8, %stack.7, 0, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store (s32) on %stack.0), (volatile load store (s32) on %stack.1), (volatile load store (s32) on %stack.2), (volatile load store (s32) on %stack.3), (volatile load store (s32) on %stack.4), (load store (s64) on %stack.7) # CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp --- | Index: llvm/test/CodeGen/X86/statepoint-ra.ll =================================================================== --- llvm/test/CodeGen/X86/statepoint-ra.ll +++ llvm/test/CodeGen/X86/statepoint-ra.ll @@ -65,53 +65,53 @@ ;CHECK: bb.0.bb: ;CHECK: successors: %bb.2(0x40000000), %bb.1(0x40000000) ;CHECK: liveins: $rdi, $xmm0, $xmm1, $xmm2, $xmm3, $xmm4, $xmm5, $xmm6, $xmm7 -;CHECK: %49:fr64 = COPY $xmm7 +;CHECK: %47:fr64 = COPY $xmm7 ;CHECK: %10:fr64 = COPY $xmm6 ;CHECK: %41:fr64 = COPY $xmm5 -;CHECK: %45:fr64 = COPY $xmm4 -;CHECK: %53:fr64 = COPY $xmm3 +;CHECK: %44:fr64 = COPY $xmm4 +;CHECK: %50:fr64 = COPY $xmm3 ;CHECK: %6:fr64 = COPY $xmm2 -;CHECK: %58:fr64 = COPY $xmm1 -;CHECK: %62:fr64 = COPY $xmm0 +;CHECK: %54:fr64 = COPY $xmm1 +;CHECK: %57:fr64 = COPY $xmm0 ;CHECK: %3:gr64 = COPY $rdi -;CHECK: %76:fr64 = MOVSDrm_alt %fixed-stack.0, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.0) +;CHECK: %68:fr64 = MOVSDrm_alt %fixed-stack.0, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.0) ;CHECK: %14:fr64 = MOVSDrm_alt %fixed-stack.1, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.1, align 16) -;CHECK: %66:fr64 = MOVSDrm_alt %fixed-stack.2, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.2) -;CHECK: %71:fr64 = MOVSDrm_alt %fixed-stack.3, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.3, align 16) +;CHECK: %60:fr64 = MOVSDrm_alt %fixed-stack.2, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.2) +;CHECK: %64:fr64 = MOVSDrm_alt %fixed-stack.3, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.3, align 16) ;CHECK: MOV64mr %stack.0, 1, $noreg, 0, $noreg, %3 :: (store (s64) into %stack.0) ;CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp -;CHECK: STATEPOINT 2882400000, 0, 0, target-flags(x86-plt) @blam, 2, 9, 2, 0, 2, 59, 2, 0, 2, 1, 2, 0, 2, 0, 2, 0, 2, 26, 2, 0, 2, 0, 1, 8, %stack.0, 0, 2, 4, %62, 2, 7, 2, 0, 2, 4, %58, 2, 7, 2, 0, 2, 4, %6, 2, 7, 2, 0, 2, 4, %53, 2, 7, 2, 0, 2, 4, %45, 2, 7, 2, 0, 2, 4, %41, 2, 7, 2, 0, 2, 4, %10, 2, 7, 2, 0, 2, 4, %49, 2, 7, 2, 0, 2, 4, %71, 2, 7, 2, 0, 2, 4, %66, 2, 7, 2, 0, 2, 4, %14, 2, 7, 2, 0, 2, 4, %76, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, 1, 8, %stack.0, 0, 2, 0, 2, 1, 0, 0, csr_64_mostregs, implicit-def $rsp, implicit-def $ssp :: (volatile load store (s64) on %stack.0) +;CHECK: STATEPOINT 2882400000, 0, 0, target-flags(x86-plt) @blam, 2, 9, 2, 0, 2, 59, 2, 0, 2, 1, 2, 0, 2, 0, 2, 0, 2, 26, 2, 0, 2, 0, 1, 8, %stack.0, 0, 2, 4, %57, 2, 7, 2, 0, 2, 4, %54, 2, 7, 2, 0, 2, 4, %6, 2, 7, 2, 0, 2, 4, %50, 2, 7, 2, 0, 2, 4, %44, 2, 7, 2, 0, 2, 4, %41, 2, 7, 2, 0, 2, 4, %10, 2, 7, 2, 0, 2, 4, %47, 2, 7, 2, 0, 2, 4, %64, 2, 7, 2, 0, 2, 4, %60, 2, 7, 2, 0, 2, 4, %14, 2, 7, 2, 0, 2, 4, %68, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, 1, 8, %stack.0, 0, 2, 0, 2, 1, 0, 0, csr_64_mostregs, implicit-def $rsp, implicit-def $ssp :: (volatile load store (s64) on %stack.0) ;CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp ;CHECK: %17:gr32 = MOV32r0 implicit-def dead $eflags ;CHECK: TEST8rr %17.sub_8bit, %17.sub_8bit, implicit-def $eflags ;CHECK: MOVSDmr %stack.1, 1, $noreg, 0, $noreg, %41 :: (store (s64) into %stack.1) -;CHECK: MOVSDmr %stack.2, 1, $noreg, 0, $noreg, %45 :: (store (s64) into %stack.2) -;CHECK: MOVSDmr %stack.5, 1, $noreg, 0, $noreg, %58 :: (store (s64) into %stack.5) -;CHECK: MOVSDmr %stack.6, 1, $noreg, 0, $noreg, %62 :: (store (s64) into %stack.6) +;CHECK: MOVSDmr %stack.2, 1, $noreg, 0, $noreg, %44 :: (store (s64) into %stack.2) +;CHECK: MOVSDmr %stack.5, 1, $noreg, 0, $noreg, %54 :: (store (s64) into %stack.5) +;CHECK: MOVSDmr %stack.6, 1, $noreg, 0, $noreg, %57 :: (store (s64) into %stack.6) ;CHECK: JCC_1 %bb.2, 4, implicit killed $eflags ;CHECK: bb.1: ;CHECK: successors: %bb.3(0x80000000) -;CHECK: %54:fr64 = MOVSDrm_alt $rip, 1, $noreg, %const.0, $noreg :: (load (s64) from constant-pool) -;CHECK: MOVSDmr %stack.3, 1, $noreg, 0, $noreg, %54 :: (store (s64) into %stack.3) -;CHECK: MOVSDmr %stack.4, 1, $noreg, 0, $noreg, %54 :: (store (s64) into %stack.4) -;CHECK: MOVSDmr %stack.7, 1, $noreg, 0, $noreg, %54 :: (store (s64) into %stack.7) +;CHECK: %51:fr64 = MOVSDrm_alt $rip, 1, $noreg, %const.0, $noreg :: (load (s64) from constant-pool) +;CHECK: MOVSDmr %stack.3, 1, $noreg, 0, $noreg, %51 :: (store (s64) into %stack.3) +;CHECK: MOVSDmr %stack.4, 1, $noreg, 0, $noreg, %51 :: (store (s64) into %stack.4) +;CHECK: MOVSDmr %stack.7, 1, $noreg, 0, $noreg, %51 :: (store (s64) into %stack.7) ;CHECK: JMP_1 %bb.3 ;CHECK: bb.2.bb13: ;CHECK: successors: %bb.3(0x80000000) ;CHECK: ADJCALLSTACKDOWN64 8, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp ;CHECK: MOVSDmr $rsp, 1, $noreg, 0, $noreg, %14 :: (store (s64) into stack) ;CHECK: dead $edi = MOV32r0 implicit-def dead $eflags, implicit-def $rdi -;CHECK: $xmm0 = COPY %62 -;CHECK: $xmm1 = COPY %58 +;CHECK: $xmm0 = COPY %57 +;CHECK: $xmm1 = COPY %54 ;CHECK: $xmm2 = COPY %6 -;CHECK: $xmm3 = COPY %45 +;CHECK: $xmm3 = COPY %44 ;CHECK: $xmm4 = COPY %41 ;CHECK: $xmm5 = COPY %10 -;CHECK: $xmm6 = COPY %71 -;CHECK: $xmm7 = COPY %66 -;CHECK: MOVSDmr %stack.3, 1, $noreg, 0, $noreg, %49 :: (store (s64) into %stack.3) -;CHECK: MOVSDmr %stack.4, 1, $noreg, 0, $noreg, %53 :: (store (s64) into %stack.4) -;CHECK: MOVSDmr %stack.7, 1, $noreg, 0, $noreg, %76 :: (store (s64) into %stack.7) +;CHECK: $xmm6 = COPY %64 +;CHECK: $xmm7 = COPY %60 +;CHECK: MOVSDmr %stack.3, 1, $noreg, 0, $noreg, %47 :: (store (s64) into %stack.3) +;CHECK: MOVSDmr %stack.4, 1, $noreg, 0, $noreg, %50 :: (store (s64) into %stack.4) +;CHECK: MOVSDmr %stack.7, 1, $noreg, 0, $noreg, %68 :: (store (s64) into %stack.7) ;CHECK: STATEPOINT 2, 5, 9, undef %22:gr64, $rdi, $xmm0, $xmm1, $xmm2, $xmm3, $xmm4, $xmm5, $xmm6, $xmm7, 2, 0, 2, 0, 2, 59, 2, 0, 2, 2, 2, 0, 2, 70, 2, 0, 2, 26, 2, 0, 2, 0, 2, 0, 2, 4, 1, 8, %stack.6, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.5, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.4, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.2, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.1, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.3, 0, 2, 7, 2, 0, 2, 4, 1, 8, %fixed-stack.3, 0, 2, 7, 2, 0, 2, 4, 1, 8, %fixed-stack.2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 4, 1, 8, %fixed-stack.0, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, 2, 0, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax :: (load (s64) from %stack.1), (load (s64) from %stack.2), (load (s64) from %stack.3), (load (s64) from %stack.4), (load (s64) from %stack.5), (load (s64) from %stack.6), (load (s64) from %fixed-stack.2), (load (s64) from %fixed-stack.3, align 16), (load (s64) from %fixed-stack.0) ;CHECK: ADJCALLSTACKUP64 8, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp ;CHECK: bb.3.bb15: @@ -132,22 +132,20 @@ ;CHECK: bb.5.bb21: ;CHECK: successors: ;CHECK: ADJCALLSTACKDOWN64 8, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp -;CHECK: %81:fr64 = MOVSDrm_alt %stack.7, 1, $noreg, 0, $noreg :: (load (s64) from %stack.7) -;CHECK: MOVSDmr $rsp, 1, $noreg, 0, $noreg, %81 :: (store (s64) into stack) +;CHECK: %70:fr64 = MOVSDrm_alt %stack.7, 1, $noreg, 0, $noreg :: (load (s64) from %stack.7) +;CHECK: MOVSDmr $rsp, 1, $noreg, 0, $noreg, %70 :: (store (s64) into stack) ;CHECK: $xmm0 = MOVSDrm_alt %stack.6, 1, $noreg, 0, $noreg :: (load (s64) from %stack.6) ;CHECK: $xmm1 = MOVSDrm_alt %stack.5, 1, $noreg, 0, $noreg :: (load (s64) from %stack.5) ;CHECK: $xmm2 = MOVSDrm_alt %stack.4, 1, $noreg, 0, $noreg :: (load (s64) from %stack.4) ;CHECK: $xmm3 = MOVSDrm_alt %stack.2, 1, $noreg, 0, $noreg :: (load (s64) from %stack.2) ;CHECK: $xmm4 = MOVSDrm_alt %stack.1, 1, $noreg, 0, $noreg :: (load (s64) from %stack.1) ;CHECK: $xmm5 = MOVSDrm_alt %stack.3, 1, $noreg, 0, $noreg :: (load (s64) from %stack.3) -;CHECK: %74:fr64 = MOVSDrm_alt %fixed-stack.3, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.3, align 16) -;CHECK: %95:fr64 = COPY %74 -;CHECK: $xmm6 = COPY %95 +;CHECK: %66:fr64 = MOVSDrm_alt %fixed-stack.3, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.3, align 16) +;CHECK: $xmm6 = COPY %66 ;CHECK: $esi = MOV32ri 51 -;CHECK: %69:fr64 = MOVSDrm_alt %fixed-stack.2, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.2) -;CHECK: %97:fr64 = COPY %69 -;CHECK: $xmm7 = COPY %97 -;CHECK: STATEPOINT 2, 5, 10, undef %36:gr64, undef $rdi, $xmm0, $xmm1, $xmm2, $xmm3, $xmm4, $xmm5, $xmm6, $xmm7, killed $esi, 2, 0, 2, 0, 2, 105, 2, 0, 2, 2, 2, 0, 2, 97, 2, 0, 2, 26, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 2, 2, 2, 2, 46, 2, 0, 2, 20, 2, 0, 2, 0, 2, 4278124286, 2, 4, 1, 8, %stack.6, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.5, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.4, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.2, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.1, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.3, 0, 2, 7, 2, 0, 2, 4, 1, 8, %fixed-stack.3, 0, 2, 7, 2, 0, 2, 4, 1, 8, %fixed-stack.2, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.7, 0, 2, 7, 2, 0, 2, 3, 2, 51, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp :: (load (s64) from %stack.7), (load (s64) from %stack.6), (load (s64) from %stack.5), (load (s64) from %stack.4), (load (s64) from %stack.2), (load (s64) from %stack.1), (load (s64) from %stack.3), (load (s64) from %fixed-stack.3, align 16), (load (s64) from %fixed-stack.2) +;CHECK: %62:fr64 = MOVSDrm_alt %fixed-stack.2, 1, $noreg, 0, $noreg :: (load (s64) from %fixed-stack.2) +;CHECK: $xmm7 = COPY %62 +;CHECK: STATEPOINT 2, 5, 10, undef %36:gr64, undef $rdi, $xmm0, $xmm1, $xmm2, $xmm3, $xmm4, $xmm5, $xmm6, $xmm7, killed $esi, 2, 0, 2, 0, 2, 105, 2, 0, 2, 2, 2, 0, 2, 97, 2, 0, 2, 26, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 2, 2, 2, 2, 46, 2, 0, 2, 20, 2, 0, 2, 0, 2, 4278124286, 2, 4, 1, 8, %stack.6, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.5, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.4, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.2, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.1, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.3, 0, 2, 7, 2, 0, 2, 4, 1, 8, %fixed-stack.3, 0, 2, 7, 2, 0, 2, 4, 1, 8, %fixed-stack.2, 0, 2, 7, 2, 0, 2, 4, 1, 8, %stack.7, 0, 2, 7, 2, 0, 2, 3, 2, 51, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp :: (load (s64) from %stack.1), (load (s64) from %stack.2), (load (s64) from %stack.3), (load (s64) from %stack.4), (load (s64) from %stack.5), (load (s64) from %stack.6), (load (s64) from %fixed-stack.2), (load (s64) from %fixed-stack.3, align 16), (load (s64) from %stack.7) ;CHECK: ADJCALLSTACKUP64 8, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp ;CHECK: bb.6.bb23 (landing-pad): ;CHECK: liveins: $rax, $rdx Index: llvm/test/CodeGen/X86/statepoint-split-single-block.ll =================================================================== --- llvm/test/CodeGen/X86/statepoint-split-single-block.ll +++ llvm/test/CodeGen/X86/statepoint-split-single-block.ll @@ -34,11 +34,9 @@ ; CHECK-NEXT: movabsq $nocsr, %rax ; CHECK-NEXT: callq *%rax ; CHECK-NEXT: movabsq $bar, %rax -; CHECK-NEXT: movq (%rsp), %rbx # 8-byte Reload -; CHECK-NEXT: movq %rbx, %rdi -; CHECK-NEXT: callq *%rax +; CHECK-NEXT: movq (%rsp), %rdi # 8-byte Reload +; CHECK-NEXT: callq *%rax # 8-byte Folded Reload ; CHECK-NEXT: .Ltmp0: -; CHECK-NEXT: movq %rbx, (%rsp) # 8-byte Spill ; CHECK-NEXT: movabsq $nocsr, %rax ; CHECK-NEXT: callq *%rax ; CHECK-NEXT: movq (%rsp), %rax # 8-byte Reload