1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00

[GreedyRA] Add support for invoke statepoint with tied-defs.

statepoint instruction uses tied-def registers to represent live gc value which
is use and def at the same time on a call.
At the same time invoke statepoint instruction is a last split point which can throw and
jump to landing pad.
As a result we have instructon which is last split point with tied-defs registers and
we need to teach Greedy RA to work with it.

The option -use-registers-for-gc-values-in-landing-pad controls whether statepoint lowering
will generate tied-defs for invoke statepoint and is off by default now.

To resolve all issues the following changes has been done.
1) Last Split point for invoke statepoint should be statepoint itself

If statepoint has a def it is a relocated gc pointer and it should be available in landing pad.
So we cannot split interval after statepoint at end of basic block.

2) Do not split interval on tied-def

If end of interval for overlap utility is a use which has tied-def we
should not split interval on this instruction due to in this case use
and def may have different registers and it breaks tied-def property.

3) Take into account Last Split Point for enterIntvAtEnd

If the use after Last Split Point is a def so it should be tied-def and
we can take the def of the tied-use as ParentVNI and thus
tied-use and tied-def will be live in resulting interval.

4) Handle the case when def is after LIP in InlineSpiller

If def of LI is after last insertion point of basic block we cannot hoist in this BB.

The example of such instruction is invoke statepoint where def represents the
relocated live gc pointer. Invoke is a last insertion point and its def is located after it.
In this case there is no place to insert spill and we bail out.

5) Fix removeBackCopies to account empty copies

RegAssignMap cannot hold empty interval, so do not set stop
to kill value if it produces empty interval.

This can happen if we remove back-copy and right before that we have another
back-copy.

For example, for parent %0 we can get
%1 = COPY %0
%2 = COPY %0
while we removing %2 we cannot set kill for %1 due to its empty.

6) Do not hoist copy to BB if its def is after LSP

If the parent def is a LastSplitPoint or later we cannot hoist copy to this basic block
because inserted copy (or re-materialization) will be located before the def.

All parts have been reviewed separately as follows:
https://reviews.llvm.org/D100747
https://reviews.llvm.org/D100748
https://reviews.llvm.org/D100750
https://reviews.llvm.org/D100927
https://reviews.llvm.org/D100945
https://reviews.llvm.org/D101028

Reviewers: reames, rnk, void, MatzeB, wmi, qcolombet
Reviewed By: reames, qcolombet
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D101150
This commit is contained in:
Serguei Katkov 2021-05-04 10:56:00 +07:00
parent 795d87c4aa
commit 2281491db1
8 changed files with 2395 additions and 102 deletions

View File

@ -1246,6 +1246,14 @@ bool HoistSpillHelper::rmFromMergeableSpills(MachineInstr &Spill,
bool HoistSpillHelper::isSpillCandBB(LiveInterval &OrigLI, VNInfo &OrigVNI,
MachineBasicBlock &BB, Register &LiveReg) {
SlotIndex Idx = IPA.getLastInsertPoint(OrigLI, BB);
// The original def could be after the last insert point in the root block,
// we can't hoist to here.
if (Idx < OrigVNI.def) {
// TODO: We could be better here. If LI is not alive in landing pad
// we could hoist spill after LIP.
LLVM_DEBUG(dbgs() << "can't spill in root block - def after LIP\n");
return false;
}
Register OrigReg = OrigLI.reg();
SmallSetVector<Register, 16> &Siblings = Virt2SiblingsMap[OrigReg];
assert(OrigLI.getVNInfoAt(Idx) == &OrigVNI && "Unexpected VNI");

View File

@ -118,6 +118,13 @@ InsertPointAnalysis::computeLastInsertPoint(const LiveInterval &CurLI,
if (!VNI)
return LIP.first;
// The def of statepoint instruction is a gc relocation and it should be alive
// in landing pad. So we cannot split interval after statepoint instruction.
if (SlotIndex::isSameInstr(VNI->def, LIP.second))
if (auto *I = LIS.getInstructionFromIndex(LIP.second))
if (I->getOpcode() == TargetOpcode::STATEPOINT)
return LIP.second;
// If the value leaving MBB was defined after the call in MBB, it can't
// really be live-in to the landing pad. This can happen if the landing pad
// has a PHI, and this register is undef on the exceptional edge.
@ -695,6 +702,23 @@ SlotIndex SplitEditor::enterIntvAtEnd(MachineBasicBlock &MBB) {
LLVM_DEBUG(dbgs() << ": not live\n");
return End;
}
SlotIndex LSP = SA.getLastSplitPoint(&MBB);
if (LSP < Last) {
// It could be that the use after LSP is a def, and thus the ParentVNI
// just selected starts at that def. For this case to exist, the def
// must be part of a tied def/use pair (as otherwise we'd have split
// distinct live ranges into individual live intervals), and thus we
// can insert the def into the VNI of the use and the tied def/use
// pair can live in the resulting interval.
Last = LSP;
ParentVNI = Edit->getParent().getVNInfoAt(Last);
if (!ParentVNI) {
// undef use --> undef tied def
LLVM_DEBUG(dbgs() << ": tied use not live\n");
return End;
}
}
LLVM_DEBUG(dbgs() << ": valno " << ParentVNI->id);
VNInfo *VNI = defFromParent(OpenIdx, ParentVNI, Last, MBB,
SA.getLastSplitPointIter(&MBB));
@ -784,6 +808,12 @@ SlotIndex SplitEditor::leaveIntvAtTop(MachineBasicBlock &MBB) {
return VNI->def;
}
static bool hasTiedUseOf(MachineInstr &MI, unsigned Reg) {
return any_of(MI.defs(), [Reg](const MachineOperand &MO) {
return MO.isReg() && MO.isTied() && MO.getReg() == Reg;
});
}
void SplitEditor::overlapIntv(SlotIndex Start, SlotIndex End) {
assert(OpenIdx && "openIntv not called before overlapIntv");
const VNInfo *ParentVNI = Edit->getParent().getVNInfoAt(Start);
@ -795,6 +825,16 @@ void SplitEditor::overlapIntv(SlotIndex Start, SlotIndex End) {
// The complement interval will be extended as needed by LICalc.extend().
if (ParentVNI)
forceRecompute(0, *ParentVNI);
// If the last use is tied to a def, we can't mark it as live for the
// interval which includes only the use. That would cause the tied pair
// to end up in two different intervals.
if (auto *MI = LIS.getInstructionFromIndex(End))
if (hasTiedUseOf(*MI, Edit->getReg())) {
LLVM_DEBUG(dbgs() << "skip overlap due to tied def at end\n");
return;
}
LLVM_DEBUG(dbgs() << " overlapIntv [" << Start << ';' << End << "):");
RegAssign.insert(Start, End, OpenIdx);
LLVM_DEBUG(dump());
@ -835,12 +875,18 @@ void SplitEditor::removeBackCopies(SmallVectorImpl<VNInfo*> &Copies) {
if (AssignI.stop() != Def)
continue;
unsigned RegIdx = AssignI.value();
if (AtBegin || !MBBI->readsVirtualRegister(Edit->getReg())) {
// We could hoist back-copy right after another back-copy. As a result
// MMBI points to copy instruction which is actually dead now.
// We cannot set its stop to MBBI which will be the same as start and
// interval does not support that.
SlotIndex Kill =
AtBegin ? SlotIndex() : LIS.getInstructionIndex(*MBBI).getRegSlot();
if (AtBegin || !MBBI->readsVirtualRegister(Edit->getReg()) ||
Kill <= AssignI.start()) {
LLVM_DEBUG(dbgs() << " cannot find simple kill of RegIdx " << RegIdx
<< '\n');
forceRecompute(RegIdx, *Edit->getParent().getVNInfoAt(Def));
} else {
SlotIndex Kill = LIS.getInstructionIndex(*MBBI).getRegSlot();
LLVM_DEBUG(dbgs() << " move kill to " << Kill << '\t' << *MBBI);
AssignI.setStop(Kill);
}
@ -1046,10 +1092,13 @@ void SplitEditor::hoistCopies() {
NotToHoistSet.insert(ParentVNI->id);
continue;
}
SlotIndex Last = LIS.getMBBEndIdx(Dom.first).getPrevSlot();
Dom.second =
defFromParent(0, ParentVNI, Last, *Dom.first,
SA.getLastSplitPointIter(Dom.first))->def;
SlotIndex LSP = SA.getLastSplitPoint(Dom.first);
if (LSP <= ParentVNI->def) {
NotToHoistSet.insert(ParentVNI->id);
continue;
}
Dom.second = defFromParent(0, ParentVNI, LSP, *Dom.first,
SA.getLastSplitPointIter(Dom.first))->def;
}
// Remove redundant back-copies that are now known to be dominated by another

View File

@ -511,7 +511,8 @@ public:
SlotIndex leaveIntvAtTop(MachineBasicBlock &MBB);
/// overlapIntv - Indicate that all instructions in range should use the open
/// interval, but also let the complement interval be live.
/// interval if End does not have tied-def usage of the register and in this
/// case compliment interval is used. Let the complement interval be live.
///
/// This doubles the register pressure, but is sometimes required to deal with
/// register uses after the last valid split point.

View File

@ -0,0 +1,492 @@
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -x mir -o - %s -run-pass=greedy -verify-regalloc 2>&1 | FileCheck %s
# CHECK-NOT: Bad Parent VNI
--- |
; ModuleID = './statepoint-invoke-ra2.ll'
source_filename = "./statepoint-invoke-ra2.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@global = external global i8 addrspace(1)*, align 8
@global.1 = external global i8 addrspace(1)*, align 8
define void @bar(i8 addrspace(1)* %arg) gc "statepoint-example" personality i32* ()* @zot {
bb:
%tmp = inttoptr i64 undef to i8 addrspace(1)*
br label %bb1
bb1: ; preds = %bb64, %bb
%tmp3 = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2, i32 5, void ()* nonnull @wibble, i32 0, i32 0, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 7, i8* null, i32 2, i32 1, i32 0, i32 0, i32 5, i32 0, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* %tmp) ]
%tmp4 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp3, i32 0, i32 0) ; (%tmp, %tmp)
%tmp5 = call token (i64, i32, void (i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidp1i8f(i64 2882400000, i32 0, void (i8 addrspace(1)*)* nonnull @barney, i32 1, i32 0, i8 addrspace(1)* undef, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 7, i8* null, i32 9, i32 1, i32 9, i32 0, i32 5, i32 1, i32 7, i8* null, i32 8, i32 2, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 8, i32 2), "gc-live"(i8 addrspace(1)* undef, i8 addrspace(1)* %tmp4) ]
%tmp6 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp5, i32 1, i32 1) ; (%tmp4, %tmp4)
%tmp7 = call token (i64, i32, i8 addrspace(1)* ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_p1i8f(i64 2, i32 5, i8 addrspace(1)* ()* nonnull @blam, i32 0, i32 0, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 7, i8* null, i32 10, i32 1, i32 9, i32 0, i32 5, i32 1, i32 7, i8* null, i32 8, i32 2, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 8, i32 2), "gc-live"(i8 addrspace(1)* %tmp6, i8 addrspace(1)* undef) ]
%tmp8 = call align 8 "java-type-kid"="69" i8 addrspace(1)* @llvm.experimental.gc.result.p1i8(token %tmp7)
%tmp9 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp7, i32 0, i32 0) ; (%tmp6, %tmp6)
br i1 undef, label %bb64, label %bb10
bb10: ; preds = %bb1
%tmp11 = inttoptr i64 undef to i8 addrspace(1)*
%tmp12 = call i8 addrspace(1)* @wobble.3(i8 addrspace(1)* undef, i8 addrspace(1)* addrspace(1)* undef)
%tmp13 = select i1 false, i8 addrspace(1)* null, i8 addrspace(1)* %tmp12
%tmp14 = extractvalue { i32, i1 } undef, 1
br i1 %tmp14, label %bb17, label %bb15
bb15: ; preds = %bb10
%tmp16 = call token (i64, i32, void (i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidp1i8f(i64 2882400000, i32 0, void (i8 addrspace(1)*)* nonnull @barney, i32 1, i32 0, i8 addrspace(1)* undef, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 7, i8* null, i32 2, i32 1, i32 71, i32 0, i32 5, i32 0, i32 0, i8 addrspace(1)* %tmp13, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 2, i32 5, i32 1, i32 0, i32 2, i32 0, i32 0, i8 addrspace(1)* %tmp8, i32 7, i8* null, i32 1, i32 6, i32 0, i32 0, i32 1, i32 1, i32 0, i8 addrspace(1)* %tmp8, i32 8, i32 10), "gc-live"(i8 addrspace(1)* %tmp9, i8 addrspace(1)* %tmp13, i8 addrspace(1)* %tmp11, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp8) ]
unreachable
bb17: ; preds = %bb10
%tmp18 = load atomic i32, i32 addrspace(1)* undef unordered, align 4
%tmp19 = and i32 %tmp18, 33554431
%tmp20 = invoke token (i64, i32, void (i32, i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32p1i8f(i64 1, i32 16, void (i32, i8 addrspace(1)*)* nonnull @spam, i32 2, i32 0, i32 %tmp19, i8 addrspace(1)* nonnull undef, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 7, i8* null, i32 2, i32 1, i32 71, i32 0, i32 5, i32 0, i32 0, i8 addrspace(1)* %tmp13, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 8, i32 5, i32 12, i32 0, i32 2, i32 0, i32 0, i8 addrspace(1)* %tmp8, i32 7, i8* null), "gc-live"(i8 addrspace(1)* %tmp9, i8 addrspace(1)* %tmp13, i8 addrspace(1)* %tmp13, i8 addrspace(1)* %tmp11, i8 addrspace(1)* %tmp8, i8 addrspace(1)* undef) ]
to label %bb21 unwind label %bb59
bb21: ; preds = %bb17
%tmp22 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp20, i32 0, i32 0) ; (%tmp9, %tmp9)
%tmp23 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp20, i32 1, i32 1) ; (%tmp13, %tmp13)
%tmp24 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp20, i32 3, i32 3) ; (%tmp11, %tmp11)
%tmp25 = load atomic i8 addrspace(1)*, i8 addrspace(1)** @global unordered, align 8
%tmp26 = ptrtoint i8 addrspace(1)* %tmp25 to i64
%tmp27 = xor i64 %tmp26, -1
%tmp28 = inttoptr i64 %tmp27 to i8 addrspace(1)*
%tmp29 = call token (i64, i32, void (i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidp1i8f(i64 2, i32 5, void (i8 addrspace(1)*)* nonnull @baz, i32 1, i32 0, i8 addrspace(1)* undef, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 7, i8* null, i32 10, i32 1, i32 83, i32 0, i32 5, i32 1, i32 0, i8 addrspace(1)* %tmp23, i32 7, i8* null, i32 8, i32 2, i32 7, i8* null, i32 7, i8* null, i32 8, i32 2), "gc-live"(i8 addrspace(1)* %tmp22, i8 addrspace(1)* %tmp23, i8 addrspace(1)* %tmp23, i8 addrspace(1)* %tmp24, i8 addrspace(1)* %tmp28) ]
%tmp30 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp29, i32 1, i32 2) ; (%tmp23, %tmp23)
%tmp31 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp29, i32 4, i32 4) ; (%tmp28, %tmp28)
%tmp45 = load atomic i8 addrspace(1)*, i8 addrspace(1)** @global.1 unordered, align 8
%tmp49 = load i32, i32 addrspace(256)* inttoptr (i64 660 to i32 addrspace(256)*), align 4
%tmp32 = icmp eq i8 addrspace(1)* %tmp30, null
br i1 %tmp32, label %bb64, label %bb33.preheader
bb33.preheader: ; preds = %bb21
br label %bb33
bb33: ; preds = %bb33.preheader, %bb33
%tmp34 = phi i8 addrspace(1)* [ %tmp57, %bb33 ], [ undef, %bb33.preheader ]
%tmp35 = phi i64 [ %tmp37, %bb33 ], [ 0, %bb33.preheader ]
%tmp37 = add nuw nsw i64 %tmp35, 1
%tmp38 = load atomic i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* undef unordered, align 8
%tmp39 = ptrtoint i8 addrspace(1)* %tmp38 to i64
%tmp40 = xor i64 %tmp39, -1
%tmp41 = inttoptr i64 %tmp40 to i8 addrspace(1)*
%tmp42 = select i1 false, i8 addrspace(1)* null, i8 addrspace(1)* %tmp41
%tmp43 = icmp eq i8 addrspace(1)* %tmp42, %tmp30
%tmp44 = select i1 %tmp43, i8 addrspace(1)* null, i8 addrspace(1)* %tmp42
call void asm sideeffect "lock btsq $0,($1)", "r,r,~{cc},~{dirflag},~{fpsr},~{flags}"(i64 0, i64* undef)
%tmp46 = ptrtoint i8 addrspace(1)* %tmp45 to i64
%tmp47 = xor i64 %tmp46, -1
%tmp48 = inttoptr i64 %tmp47 to i8 addrspace(1)*
%tmp50 = or i32 %tmp49, 268435456
%tmp51 = cmpxchg i32 addrspace(1)* undef, i32 undef, i32 %tmp50 acquire monotonic, align 4
call void @wobble(i8 addrspace(1)* nonnull %tmp48)
%tmp52 = load atomic i8 addrspace(1)*, i8 addrspace(1)** @global unordered, align 8
%tmp53 = ptrtoint i8 addrspace(1)* %tmp52 to i64
%tmp54 = xor i64 %tmp53, -1
%tmp55 = inttoptr i64 %tmp54 to i8 addrspace(1)*
%tmp56 = call token (i64, i32, void (i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidp1i8f(i64 2, i32 5, void (i8 addrspace(1)*)* nonnull @baz, i32 1, i32 0, i8 addrspace(1)* %tmp55, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 7, i8* null, i32 10, i32 1, i32 83, i32 0, i32 5, i32 1, i32 0, i8 addrspace(1)* %tmp44, i32 7, i8* null, i32 8, i32 2, i32 7, i8* null, i32 7, i8* null, i32 8, i32 2), "gc-live"(i8 addrspace(1)* undef, i8 addrspace(1)* %tmp44, i8 addrspace(1)* %tmp44, i8 addrspace(1)* %tmp34, i8 addrspace(1)* undef) ]
%tmp57 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp56, i32 3, i32 3) ; (%tmp34, %tmp34)
br label %bb33
bb59: ; preds = %bb17
%tmp60 = landingpad token
cleanup
%tmp61 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp60, i32 1, i32 2) ; (%tmp13, %tmp13)
%tmp62 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp60, i32 4, i32 4) ; (%tmp8, %tmp8)
%tmp63 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* bitcast (void (i64)* @barney.2 to void (i32)*), i32 1, i32 2, i32 -13, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 7, i8* null, i32 2, i32 1, i32 71, i32 0, i32 5, i32 0, i32 0, i8 addrspace(1)* %tmp61, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 1, i32 5, i32 21, i32 0, i32 2, i32 0, i32 0, i8 addrspace(1)* %tmp62, i32 0, i8 addrspace(1)* undef), "gc-live"() ]
unreachable
bb64: ; preds = %bb21, %bb1
%tmp65 = or i32 undef, 268435456
%tmp66 = cmpxchg i32 addrspace(1)* undef, i32 undef, i32 %tmp65 acquire monotonic, align 4
%tmp67 = call token (i64, i32, void (i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidp1i8f(i64 2, i32 5, void (i8 addrspace(1)*)* nonnull @baz, i32 1, i32 0, i8 addrspace(1)* undef, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 7, i8* null, i32 10, i32 1, i32 133, i32 0, i32 5, i32 1, i32 7, i8* null, i32 8, i32 2, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 8, i32 2), "gc-live"(i8 addrspace(1)* undef, i8 addrspace(1)* undef) ]
br label %bb1
}
declare i32* @zot()
declare void @wibble() gc "statepoint-example"
declare i8 addrspace(1)* @blam() gc "statepoint-example"
declare void @baz(i8 addrspace(1)*) gc "statepoint-example"
declare void @spam(i32, i8 addrspace(1)*)
declare void @wobble(i8 addrspace(1)*)
declare void @barney(i8 addrspace(1)*)
declare token @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 immarg, i32 immarg, void ()*, i32 immarg, i32 immarg, ...)
; Function Attrs: nounwind readnone
declare i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token, i32 immarg, i32 immarg) #0
declare token @llvm.experimental.gc.statepoint.p0f_isVoidp1i8f(i64 immarg, i32 immarg, void (i8 addrspace(1)*)*, i32 immarg, i32 immarg, ...)
declare token @llvm.experimental.gc.statepoint.p0f_p1i8f(i64 immarg, i32 immarg, i8 addrspace(1)* ()*, i32 immarg, i32 immarg, ...)
; Function Attrs: nounwind readnone
declare i8 addrspace(1)* @llvm.experimental.gc.result.p1i8(token) #0
declare token @llvm.experimental.gc.statepoint.p0f_isVoidi32p1i8f(i64 immarg, i32 immarg, void (i32, i8 addrspace(1)*)*, i32 immarg, i32 immarg, ...)
declare void @barney.2(i64)
declare token @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 immarg, i32 immarg, void (i32)*, i32 immarg, i32 immarg, ...)
declare i8 addrspace(1)* @wobble.3(i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)*)
attributes #0 = { nounwind readnone }
...
---
name: bar
alignment: 16
exposesReturnsTwice: false
legalized: false
regBankSelected: false
selected: false
failedISel: false
tracksRegLiveness: true
hasWinCFI: false
registers:
- { id: 0, class: gr64, preferred-register: '' }
- { id: 1, class: gr64, preferred-register: '' }
- { id: 2, class: gr64, preferred-register: '' }
- { id: 3, class: gr64, preferred-register: '' }
- { id: 4, class: gr64, preferred-register: '' }
- { id: 5, class: gr64, preferred-register: '' }
- { id: 6, class: gr64, preferred-register: '' }
- { id: 7, class: gr32, preferred-register: '' }
- { id: 8, class: gr64, preferred-register: '' }
- { id: 9, class: gr64, preferred-register: '' }
- { id: 10, class: gr64, preferred-register: '' }
- { id: 11, class: gr64, preferred-register: '' }
- { id: 12, class: gr64, preferred-register: '' }
- { id: 13, class: gr64, preferred-register: '' }
- { id: 14, class: gr64, preferred-register: '' }
- { id: 15, class: gr64, preferred-register: '' }
- { id: 16, class: gr64, preferred-register: '' }
- { id: 17, class: gr64, preferred-register: '' }
- { id: 18, class: gr64, preferred-register: '' }
- { id: 19, class: gr64, preferred-register: '' }
- { id: 20, class: gr32, preferred-register: '' }
- { id: 21, class: gr8, preferred-register: '' }
- { id: 22, class: gr64, preferred-register: '' }
- { id: 23, class: gr64, preferred-register: '' }
- { id: 24, class: gr64, preferred-register: '' }
- { id: 25, class: gr32, preferred-register: '' }
- { id: 26, class: gr8, preferred-register: '' }
- { id: 27, class: gr64, preferred-register: '' }
- { id: 28, class: gr64, preferred-register: '' }
- { id: 29, class: gr64, preferred-register: '' }
- { id: 30, class: gr64, preferred-register: '' }
- { id: 31, class: gr64, preferred-register: '' }
- { id: 32, class: gr64, preferred-register: '' }
- { id: 33, class: gr64, preferred-register: '' }
- { id: 34, class: gr32, preferred-register: '' }
- { id: 35, class: gr64, preferred-register: '' }
- { id: 36, class: gr32, preferred-register: '' }
- { id: 37, class: gr64, preferred-register: '' }
- { id: 38, class: gr64, preferred-register: '' }
- { id: 39, class: gr64, preferred-register: '' }
- { id: 40, class: gr64, preferred-register: '' }
- { id: 41, class: gr32, preferred-register: '' }
- { id: 42, class: gr64, preferred-register: '' }
- { id: 43, class: gr64, preferred-register: '' }
- { id: 44, class: gr64, preferred-register: '' }
- { id: 45, class: gr64, preferred-register: '' }
- { id: 46, class: gr64, preferred-register: '' }
- { id: 47, class: gr64, preferred-register: '' }
- { id: 48, class: gr64, preferred-register: '' }
- { id: 49, class: gr64, preferred-register: '' }
- { id: 50, class: gr64, preferred-register: '' }
- { id: 51, class: gr64, preferred-register: '' }
- { id: 52, class: gr64, preferred-register: '' }
- { id: 53, class: gr64_with_sub_8bit, preferred-register: '' }
- { id: 54, class: gr32, preferred-register: '' }
- { id: 55, class: gr64_with_sub_8bit, preferred-register: '' }
- { id: 56, class: gr64, preferred-register: '' }
- { id: 57, class: gr64, preferred-register: '' }
- { id: 58, class: gr64, preferred-register: '' }
- { id: 59, class: gr64, preferred-register: '' }
- { id: 60, class: gr64, preferred-register: '' }
- { id: 61, class: gr32, preferred-register: '' }
- { id: 62, class: gr64, preferred-register: '' }
- { id: 63, class: gr64, preferred-register: '' }
- { id: 64, class: gr64, preferred-register: '' }
- { id: 65, class: gr32, preferred-register: '' }
- { id: 66, class: gr32, preferred-register: '' }
- { id: 67, class: gr64, preferred-register: '' }
- { id: 68, class: gr32, preferred-register: '' }
- { id: 69, class: gr64, preferred-register: '' }
- { id: 70, class: gr64, preferred-register: '' }
- { id: 71, class: gr64, preferred-register: '' }
- { id: 72, class: gr64, preferred-register: '' }
- { id: 73, class: gr64, preferred-register: '' }
- { id: 74, class: gr32, preferred-register: '' }
- { id: 75, class: gr32, preferred-register: '' }
- { id: 76, class: gr64, preferred-register: '' }
- { id: 77, class: gr32, preferred-register: '' }
- { id: 78, class: gr64, preferred-register: '' }
- { id: 79, class: gr64, preferred-register: '' }
- { id: 80, class: gr64, preferred-register: '' }
- { id: 81, class: gr64_with_sub_8bit, preferred-register: '' }
liveins: []
frameInfo:
isFrameAddressTaken: false
isReturnAddressTaken: false
hasStackMap: false
hasPatchPoint: false
stackSize: 0
offsetAdjustment: 0
maxAlignment: 1
adjustsStack: false
hasCalls: true
stackProtector: ''
maxCallFrameSize: 4294967295
cvBytesOfCalleeSavedRegisters: 0
hasOpaqueSPAdjustment: false
hasVAStart: false
hasMustTailInVarArgFunc: false
hasTailCall: false
localFrameSize: 0
savePoint: ''
restorePoint: ''
fixedStack: []
stack: []
callSites: []
debugValueSubstitutions: []
constants: []
machineFunctionInfo: {}
body: |
; CHECK-LABEL: name: bar
; CHECK: bb.0.bb:
; CHECK: successors: %bb.1(0x80000000)
; CHECK: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
; CHECK: [[MOV32ri:%[0-9]+]]:gr32 = MOV32ri -1
; CHECK: bb.1.bb1:
; CHECK: successors: %bb.9(0x40000000), %bb.2(0x40000000)
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[STATEPOINT:%[0-9]+]]:gr64 = STATEPOINT 2, 5, 0, undef %16:gr64, 2, 0, 2, 0, 2, 25, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 1, 2, 0, 2, 0, 2, 5, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, undef [[STATEPOINT]](tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[STATEPOINT1:%[0-9]+]]:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @barney, undef $rdi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 9, 2, 1, 2, 9, 2, 0, 2, 5, 2, 1, 2, 7, 2, 0, 2, 8, 2, 2, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 2, 2, 1, [[STATEPOINT1]](tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[STATEPOINT1:%[0-9]+]]:gr64 = STATEPOINT 2, 5, 0, undef %18:gr64, 2, 0, 2, 0, 2, 27, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 9, 2, 0, 2, 5, 2, 1, 2, 7, 2, 0, 2, 8, 2, 2, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 2, 2, 1, [[STATEPOINT1]](tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def $rax
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[COPY:%[0-9]+]]:gr64 = COPY $rax
; CHECK: TEST8rr [[MOV32r0_]].sub_8bit, [[MOV32r0_]].sub_8bit, implicit-def $eflags
; CHECK: JCC_1 %bb.9, 5, implicit killed $eflags
; CHECK: JMP_1 %bb.2
; CHECK: bb.2.bb10:
; CHECK: successors: %bb.4(0x80000000), %bb.3(0x00000000)
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: CALL64pcrel32 target-flags(x86-plt) @wobble.3, csr_64, implicit $rsp, implicit $ssp, implicit undef $rdi, implicit undef $rsi, implicit-def $rsp, implicit-def $ssp, implicit-def $rax
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[COPY1:%[0-9]+]]:gr64 = COPY $rax
; CHECK: TEST8rr [[MOV32r0_]].sub_8bit, [[MOV32r0_]].sub_8bit, implicit-def $eflags
; CHECK: JCC_1 %bb.4, 5, implicit killed $eflags
; CHECK: JMP_1 %bb.3
; CHECK: bb.3.bb15:
; CHECK: successors:
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: dead [[COPY1]]:gr64, dead [[COPY]]:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @barney, undef $rdi, 2, 0, 2, 0, 2, 45, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 1, 2, 71, 2, 0, 2, 5, 2, 0, 2, 0, [[COPY1]], 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 2, 2, 5, 2, 1, 2, 0, 2, 2, 2, 0, 2, 0, [[COPY]], 2, 7, 2, 0, 2, 1, 2, 6, 2, 0, 2, 0, 2, 1, 2, 1, 2, 0, [[COPY]], 2, 8, 2, 10, 2, 2, [[COPY1]](tied-def 0), [[COPY]](tied-def 1), 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: bb.4.bb17:
; CHECK: successors: %bb.5(0x80000000), %bb.8(0x00000000)
; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm undef %35:gr64, 1, $noreg, 0, $noreg :: (load unordered 4 from `i32 addrspace(1)* undef`, addrspace 1)
; CHECK: [[AND32ri:%[0-9]+]]:gr32 = AND32ri [[AND32ri]], 33554431, implicit-def dead $eflags
; CHECK: EH_LABEL <mcsymbol .Ltmp0>
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $edi = COPY [[AND32ri]]
; CHECK: [[COPY2:%[0-9]+]]:gr64 = COPY [[COPY1]]
; CHECK: dead %30:gr64, [[COPY2]]:gr64, dead [[STATEPOINT1]]:gr64, [[COPY]]:gr64 = STATEPOINT 1, 16, 2, undef %38:gr64, $edi, undef $rsi, 2, 0, 2, 0, 2, 35, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 1, 2, 71, 2, 0, 2, 5, 2, 0, 2, 0, [[COPY2]], 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 5, 2, 12, 2, 0, 2, 2, 2, 0, 2, 0, [[COPY]], 2, 7, 2, 0, 2, 4, undef %30(tied-def 0), [[COPY2]](tied-def 1), [[STATEPOINT1]](tied-def 2), [[COPY]](tied-def 3), 2, 0, 2, 4, 0, 0, 1, 1, 2, 2, 3, 3, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: EH_LABEL <mcsymbol .Ltmp1>
; CHECK: JMP_1 %bb.5
; CHECK: bb.5.bb21:
; CHECK: successors: %bb.9(0x7c000000), %bb.6(0x04000000)
; CHECK: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @global, $noreg :: (load 8 from got)
; CHECK: [[MOV64rm1:%[0-9]+]]:gr64 = MOV64rm [[MOV64rm]], 1, $noreg, 0, $noreg :: (dereferenceable load unordered 8 from @global)
; CHECK: [[NOT64r:%[0-9]+]]:gr64 = NOT64r [[NOT64r]]
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: dead [[NOT64r]]:gr64, [[COPY2]]:gr64 = STATEPOINT 2, 5, 1, undef %50:gr64, undef $rdi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 83, 2, 0, 2, 5, 2, 1, 2, 0, [[COPY2]], 2, 7, 2, 0, 2, 8, 2, 2, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 2, 2, 2, [[NOT64r]](tied-def 0), [[COPY2]](tied-def 1), 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: TEST64rr [[COPY2]], [[COPY2]], implicit-def $eflags
; CHECK: [[COPY3:%[0-9]+]]:gr64 = COPY [[COPY2]]
; CHECK: [[MOV32ri1:%[0-9]+]]:gr32 = MOV32ri -1
; CHECK: JCC_1 %bb.9, 4, implicit killed $eflags
; CHECK: JMP_1 %bb.6
; CHECK: bb.6.bb33.preheader:
; CHECK: successors: %bb.7(0x80000000)
; CHECK: [[MOV64rm1:%[0-9]+]]:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @global.1, $noreg :: (load 8 from got)
; CHECK: [[MOV64rm2:%[0-9]+]]:gr64 = MOV64rm [[MOV64rm1]], 1, $noreg, 0, $noreg :: (dereferenceable load unordered 8 from @global.1)
; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm $noreg, 1, $noreg, 660, $gs :: (load 4 from `i32 addrspace(256)* inttoptr (i64 660 to i32 addrspace(256)*)`, addrspace 256)
; CHECK: [[NOT64r1:%[0-9]+]]:gr64 = NOT64r [[NOT64r1]]
; CHECK: [[COPY4:%[0-9]+]]:gr64 = COPY [[NOT64r1]]
; CHECK: [[OR32ri:%[0-9]+]]:gr32 = OR32ri [[OR32ri]], 268435456, implicit-def dead $eflags
; CHECK: [[COPY5:%[0-9]+]]:gr32 = COPY [[OR32ri]]
; CHECK: [[COPY6:%[0-9]+]]:gr64 = COPY [[COPY3]]
; CHECK: [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: undef %81.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
; CHECK: bb.7.bb33:
; CHECK: successors: %bb.7(0x80000000)
; CHECK: [[INC64r:%[0-9]+]]:gr64_with_sub_8bit = nuw nsw INC64r [[INC64r]], implicit-def dead $eflags
; CHECK: [[MOV64rm2:%[0-9]+]]:gr64 = MOV64rm undef %59:gr64, 1, $noreg, 0, $noreg :: (load unordered 8 from `i8 addrspace(1)* addrspace(1)* undef`, addrspace 1)
; CHECK: [[NOT64r2:%[0-9]+]]:gr64 = NOT64r [[NOT64r2]]
; CHECK: CMP64rr [[NOT64r2]], [[COPY6]], implicit-def $eflags
; CHECK: undef %102.sub_32bit:gr64_with_sub_8bit = MOV32ri 0
; CHECK: [[CMOV64rr:%[0-9]+]]:gr64 = CMOV64rr [[CMOV64rr]], %102, 4, implicit killed $eflags
; CHECK: INLINEASM &"lock btsq $0,($1)", 1 /* sideeffect attdialect */, 4325385 /* reguse:GR64 */, %102, 4325385 /* reguse:GR64 */, undef %56:gr64, 12 /* clobber */, implicit-def dead early-clobber $df, 12 /* clobber */, implicit-def early-clobber $fpsw, 12 /* clobber */, implicit-def dead early-clobber $eflags
; CHECK: LCMPXCHG32 undef %67:gr64, 1, $noreg, 0, $noreg, [[COPY5]], implicit-def dead $eax, implicit-def dead $eflags, implicit undef $eax :: (load store acquire monotonic 4 on `i32 addrspace(1)* undef`, addrspace 1)
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $rdi = COPY [[COPY4]]
; CHECK: CALL64pcrel32 target-flags(x86-plt) @wobble, csr_64, implicit $rsp, implicit $ssp, implicit $rdi, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[MOV64rm2:%[0-9]+]]:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @global, $noreg :: (load 8 from got)
; CHECK: [[MOV64rm3:%[0-9]+]]:gr64 = MOV64rm [[MOV64rm2]], 1, $noreg, 0, $noreg :: (dereferenceable load unordered 8 from @global)
; CHECK: [[NOT64r2:%[0-9]+]]:gr64 = NOT64r [[NOT64r2]]
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $rdi = COPY [[NOT64r2]]
; CHECK: [[DEF]]:gr64, dead [[CMOV64rr]]:gr64 = STATEPOINT 2, 5, 1, undef %73:gr64, $rdi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 83, 2, 0, 2, 5, 2, 1, 2, 0, [[CMOV64rr]], 2, 7, 2, 0, 2, 8, 2, 2, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 2, 2, 2, [[DEF]](tied-def 0), [[CMOV64rr]](tied-def 1), 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: JMP_1 %bb.7
; CHECK: bb.8.bb59 (landing-pad):
; CHECK: successors:
; CHECK: liveins: $rax, $rdx
; CHECK: EH_LABEL <mcsymbol .Ltmp2>
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $edi = MOV32ri -13
; CHECK: dead [[COPY2]]:gr64, dead [[COPY]]:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @barney.2, $edi, 2, 0, 2, 2, 2, 35, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 1, 2, 71, 2, 0, 2, 5, 2, 0, 2, 0, [[COPY2]], 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, 2, 5, 2, 21, 2, 0, 2, 2, 2, 0, 2, 0, [[COPY]], 2, 0, 2, 4278124286, 2, 3, [[COPY2]](tied-def 0), [[COPY]](tied-def 1), 2, 4278124286, 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: bb.9.bb64:
; CHECK: successors: %bb.1(0x80000000)
; CHECK: LCMPXCHG32 undef %76:gr64, 1, $noreg, 0, $noreg, [[MOV32ri1]], implicit-def dead $eax, implicit-def dead $eflags, implicit undef $eax :: (load store acquire monotonic 4 on `i32 addrspace(1)* undef`, addrspace 1)
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: STATEPOINT 2, 5, 1, undef %79:gr64, undef $rdi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 133, 2, 0, 2, 5, 2, 1, 2, 7, 2, 0, 2, 8, 2, 2, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 2, 2, 0, 2, 0, 2, 0, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: JMP_1 %bb.1
bb.0.bb:
successors: %bb.1(0x80000000)
%20:gr32 = MOV32r0 implicit-def dead $eflags
%74:gr32 = MOV32ri -1
%46:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @global, $noreg :: (load 8 from got)
%51:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @global.1, $noreg :: (load 8 from got)
bb.1.bb1:
successors: %bb.9(0x40000000), %bb.2(0x40000000)
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%15:gr64 = STATEPOINT 2, 5, 0, undef %16:gr64, 2, 0, 2, 0, 2, 25, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 1, 2, 0, 2, 0, 2, 5, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, undef %15(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%15:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @barney, undef $rdi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 9, 2, 1, 2, 9, 2, 0, 2, 5, 2, 1, 2, 7, 2, 0, 2, 8, 2, 2, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 2, 2, 1, %15(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%15:gr64 = STATEPOINT 2, 5, 0, undef %18:gr64, 2, 0, 2, 0, 2, 27, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 9, 2, 0, 2, 5, 2, 1, 2, 7, 2, 0, 2, 8, 2, 2, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 2, 2, 1, %15(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def $rax
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%33:gr64 = COPY $rax
TEST8rr %20.sub_8bit, %20.sub_8bit, implicit-def $eflags
JCC_1 %bb.9, 5, implicit killed $eflags
JMP_1 %bb.2
bb.2.bb10:
successors: %bb.4(0x80000000), %bb.3(0x00000000)
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
CALL64pcrel32 target-flags(x86-plt) @wobble.3, csr_64, implicit $rsp, implicit $ssp, implicit undef $rdi, implicit undef $rsi, implicit-def $rsp, implicit-def $ssp, implicit-def $rax
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%31:gr64 = COPY $rax
TEST8rr %20.sub_8bit, %20.sub_8bit, implicit-def $eflags
JCC_1 %bb.4, 5, implicit killed $eflags
JMP_1 %bb.3
bb.3.bb15:
successors:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
dead %31:gr64, dead %33:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @barney, undef $rdi, 2, 0, 2, 0, 2, 45, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 1, 2, 71, 2, 0, 2, 5, 2, 0, 2, 0, %31, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 2, 2, 5, 2, 1, 2, 0, 2, 2, 2, 0, 2, 0, %33, 2, 7, 2, 0, 2, 1, 2, 6, 2, 0, 2, 0, 2, 1, 2, 1, 2, 0, %33, 2, 8, 2, 10, 2, 2, %31(tied-def 0), %33(tied-def 1), 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.4.bb17:
successors: %bb.5(0x80000000), %bb.8(0x00000000)
%36:gr32 = MOV32rm undef %35:gr64, 1, $noreg, 0, $noreg :: (load unordered 4 from `i32 addrspace(1)* undef`, addrspace 1)
%36:gr32 = AND32ri %36, 33554431, implicit-def dead $eflags
EH_LABEL <mcsymbol .Ltmp0>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$edi = COPY %36
dead %30:gr64, %31:gr64, dead %15:gr64, %33:gr64 = STATEPOINT 1, 16, 2, undef %38:gr64, killed $edi, undef $rsi, 2, 0, 2, 0, 2, 35, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 1, 2, 71, 2, 0, 2, 5, 2, 0, 2, 0, %31, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 5, 2, 12, 2, 0, 2, 2, 2, 0, 2, 0, %33, 2, 7, 2, 0, 2, 4, undef %30(tied-def 0), %31(tied-def 1), %15(tied-def 2), %33(tied-def 3), 2, 0, 2, 4, 0, 0, 1, 1, 2, 2, 3, 3, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp1>
JMP_1 %bb.5
bb.5.bb21:
successors: %bb.9(0x7c000000), %bb.6(0x04000000)
%44:gr64 = MOV64rm %46, 1, $noreg, 0, $noreg :: (dereferenceable load unordered 8 from @global)
%44:gr64 = NOT64r %44
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
dead %44:gr64, %31:gr64 = STATEPOINT 2, 5, 1, undef %50:gr64, undef $rdi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 83, 2, 0, 2, 5, 2, 1, 2, 0, %31, 2, 7, 2, 0, 2, 8, 2, 2, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 2, 2, 2, %44(tied-def 0), %31(tied-def 1), 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
TEST64rr %31, %31, implicit-def $eflags
JCC_1 %bb.9, 4, implicit killed $eflags
JMP_1 %bb.6
bb.6.bb33.preheader:
successors: %bb.7(0x80000000)
%64:gr64 = MOV64rm %51, 1, $noreg, 0, $noreg :: (dereferenceable load unordered 8 from @global.1)
%65:gr32 = MOV32rm $noreg, 1, $noreg, 660, $gs :: (load 4 from `i32 addrspace(256)* inttoptr (i64 660 to i32 addrspace(256)*)`, addrspace 256)
undef %53.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
%64:gr64 = NOT64r %64
%65:gr32 = OR32ri %65, 268435456, implicit-def dead $eflags
%80:gr64 = IMPLICIT_DEF
undef %81.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
bb.7.bb33:
successors: %bb.7(0x80000000)
%81:gr64_with_sub_8bit = nuw nsw INC64r %81, implicit-def dead $eflags
%63:gr64 = MOV64rm undef %59:gr64, 1, $noreg, 0, $noreg :: (load unordered 8 from `i8 addrspace(1)* addrspace(1)* undef`, addrspace 1)
%63:gr64 = NOT64r %63
CMP64rr %63, %31, implicit-def $eflags
%63:gr64 = CMOV64rr %63, %53, 4, implicit killed $eflags
INLINEASM &"lock btsq $0,($1)", 1 /* sideeffect attdialect */, 4325385 /* reguse:GR64 */, %53, 4325385 /* reguse:GR64 */, undef %56:gr64, 12 /* clobber */, implicit-def dead early-clobber $df, 12 /* clobber */, implicit-def early-clobber $fpsw, 12 /* clobber */, implicit-def dead early-clobber $eflags
LCMPXCHG32 undef %67:gr64, 1, $noreg, 0, $noreg, %65, implicit-def dead $eax, implicit-def dead $eflags, implicit undef $eax :: (load store acquire monotonic 4 on `i32 addrspace(1)* undef`, addrspace 1)
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$rdi = COPY %64
CALL64pcrel32 target-flags(x86-plt) @wobble, csr_64, implicit $rsp, implicit $ssp, implicit killed $rdi, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%71:gr64 = MOV64rm %46, 1, $noreg, 0, $noreg :: (dereferenceable load unordered 8 from @global)
%71:gr64 = NOT64r %71
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$rdi = COPY %71
%80:gr64, dead %63:gr64 = STATEPOINT 2, 5, 1, undef %73:gr64, killed $rdi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 83, 2, 0, 2, 5, 2, 1, 2, 0, %63, 2, 7, 2, 0, 2, 8, 2, 2, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 2, 2, 2, %80(tied-def 0), %63(tied-def 1), 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
JMP_1 %bb.7
bb.8.bb59 (landing-pad):
successors:
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp2>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$edi = MOV32ri -13
dead %31:gr64, dead %33:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @barney.2, killed $edi, 2, 0, 2, 2, 2, 35, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 1, 2, 71, 2, 0, 2, 5, 2, 0, 2, 0, %31, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, 2, 5, 2, 21, 2, 0, 2, 2, 2, 0, 2, 0, %33, 2, 0, 2, 4278124286, 2, 3, %31(tied-def 0), %33(tied-def 1), 2, 4278124286, 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.9.bb64:
successors: %bb.1(0x80000000)
LCMPXCHG32 undef %76:gr64, 1, $noreg, 0, $noreg, %74, implicit-def dead $eax, implicit-def dead $eflags, implicit undef $eax :: (load store acquire monotonic 4 on `i32 addrspace(1)* undef`, addrspace 1)
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
STATEPOINT 2, 5, 1, undef %79:gr64, undef $rdi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 133, 2, 0, 2, 5, 2, 1, 2, 7, 2, 0, 2, 8, 2, 2, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, 2, 2, 2, 0, 2, 0, 2, 0, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
JMP_1 %bb.1
...

View File

@ -0,0 +1,756 @@
# REQUIRES: asserts
# RUN: llc -x mir -run-pass=simple-register-coalescing,greedy -verify-machineinstrs < %s 2>&1 | FileCheck %s
# CHECK-NOT: Bad Parent VNI
--- |
; ModuleID = 'hoist-copies'
source_filename = "hoist-copies.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define float @hoge(i8 addrspace(3)* %arg) gc "statepoint-example" personality i32* ()* @widget {
bb:
%tmp = load i8 addrspace(1)*, i8 addrspace(1)* addrspace(3)* null, align 8
%tmp1 = load i32, i32 addrspace(3)* undef, align 4
%tmp2 = load i32, i32 addrspace(3)* undef, align 4
%tmp3 = load i32, i32 addrspace(3)* null, align 4
%tmp4 = load i32, i32 addrspace(3)* null, align 4
%tmp5 = load i8 addrspace(1)*, i8 addrspace(1)* addrspace(3)* undef, align 8
%tmp6 = load i8 addrspace(1)*, i8 addrspace(1)* addrspace(3)* undef, align 8
%tmp7 = load i8 addrspace(1)*, i8 addrspace(1)* addrspace(3)* undef, align 8
%tmp8 = load i8 addrspace(1)*, i8 addrspace(1)* addrspace(3)* undef, align 8
%tmp9 = load i8 addrspace(1)*, i8 addrspace(1)* addrspace(3)* undef, align 8
%tmp10 = inttoptr i64 undef to i8 addrspace(1)*
%tmp11 = inttoptr i64 undef to i8 addrspace(1)*
br i1 undef, label %bb12, label %bb93
bb12: ; preds = %bb
%tmp13 = load atomic i32, i32 addrspace(1)* undef unordered, align 4
%tmp14 = and i32 %tmp13, 33554431
%tmp15 = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* nonnull @barney, i32 0, i32 0, i32 0, i32 0) [ "deopt"(i32 0, i32 1, i32 0, i32 83, i32 0, i32 19, i32 0, i32 0, i8 addrspace(1)* %tmp, i32 3, i32 %tmp1, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 %tmp4, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp5, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp6, i32 0, i8 addrspace(1)* %tmp7, i32 0, i8 addrspace(1)* %tmp8, i32 0, i8 addrspace(1)* %tmp9, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* %tmp, i8 addrspace(1)* %tmp6, i8 addrspace(1)* %tmp7, i8 addrspace(1)* %tmp8, i8 addrspace(1)* %tmp9, i8 addrspace(1)* %tmp5, i8 addrspace(1)* %tmp10, i8 addrspace(1)* %tmp11) ]
%tmp16 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp15, i32 1, i32 1) ; (%tmp6, %tmp6)
%tmp17 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp15, i32 2, i32 2) ; (%tmp7, %tmp7)
%tmp18 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp15, i32 4, i32 4) ; (%tmp9, %tmp9)
%tmp19 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp15, i32 5, i32 5) ; (%tmp5, %tmp5)
%tmp20 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp15, i32 6, i32 6) ; (%tmp10, %tmp10)
%tmp21 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp15, i32 7, i32 7) ; (%tmp11, %tmp11)
%tmp22 = invoke token (i64, i32, float (i32, i8 addrspace(1)*, i64, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_f32i32p1i8i64i32f(i64 1, i32 16, float (i32, i8 addrspace(1)*, i64, i32)* nonnull @quux, i32 4, i32 0, i32 %tmp14, i8 addrspace(1)* %tmp16, i64 -170, i32 undef, i32 0, i32 0) [ "deopt"(i32 0, i32 0, i32 0, i32 103, i32 1, i32 19, i32 0, i32 3, float undef, i32 0, i8 addrspace(1)* null, i32 3, i32 %tmp1, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 %tmp4, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp19, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp16, i32 0, i8 addrspace(1)* %tmp17, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* %tmp18, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* null, i8 addrspace(1)* %tmp16, i8 addrspace(1)* %tmp17, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp18, i8 addrspace(1)* %tmp19, i8 addrspace(1)* %tmp20, i8 addrspace(1)* %tmp21) ]
to label %bb23 unwind label %bb75
bb23: ; preds = %bb12
%tmp24 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp22, i32 1, i32 1) ; (%tmp16, %tmp16)
%tmp25 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp22, i32 2, i32 2) ; (%tmp17, %tmp17)
%tmp26 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp22, i32 4, i32 4) ; (%tmp18, %tmp18)
%tmp27 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp22, i32 5, i32 5) ; (%tmp19, %tmp19)
%tmp28 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp22, i32 6, i32 6) ; (%tmp20, %tmp20)
%tmp29 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp22, i32 7, i32 7) ; (%tmp21, %tmp21)
%tmp30 = invoke token (i64, i32, i32 (i32, i8 addrspace(1)*, i32, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32i32p1i8i32i32i32f(i64 1, i32 16, i32 (i32, i8 addrspace(1)*, i32, i32, i32)* nonnull @hoge.1, i32 5, i32 0, i32 undef, i8 addrspace(1)* %tmp26, i32 undef, i32 %tmp4, i32 %tmp4, i32 0, i32 0) [ "deopt"(i32 0, i32 8, i32 0, i32 153, i32 4, i32 19, i32 0, i32 4, i64 undef, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* null, i32 3, i32 %tmp1, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 %tmp4, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp27, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp24, i32 0, i8 addrspace(1)* %tmp25, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* %tmp26, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* null, i8 addrspace(1)* %tmp27, i8 addrspace(1)* %tmp24, i8 addrspace(1)* %tmp25, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp26, i8 addrspace(1)* %tmp28, i8 addrspace(1)* %tmp29) ]
to label %bb56 unwind label %bb65
bb31: ; preds = %bb67
%tmp32 = invoke token (i64, i32, i32 (i32, i8 addrspace(1)*, i32, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32i32p1i8i32i32i32f(i64 1, i32 16, i32 (i32, i8 addrspace(1)*, i32, i32, i32)* nonnull @hoge.1, i32 5, i32 0, i32 undef, i8 addrspace(1)* %tmp71, i32 %tmp4, i32 undef, i32 undef, i32 0, i32 0) [ "deopt"(i32 0, i32 0, i32 0, i32 537, i32 2, i32 19, i32 0, i32 0, i8 addrspace(1)* undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* null, i32 3, i32 undef, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 %tmp4, i32 3, i32 1, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp69, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp70, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* %tmp71, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* null, i8 addrspace(1)* %tmp69, i8 addrspace(1)* %tmp70, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp71, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp72, i8 addrspace(1)* undef) ]
to label %bb33 unwind label %bb77
bb33: ; preds = %bb31
%tmp34 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @ham, i32 1, i32 0, i32 15, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 591, i32 0, i32 19, i32 0, i32 7, i8* null, i32 3, i32 undef, i32 3, i32 63, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 %tmp4, i32 3, i32 1, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 3, float undef, i32 3, i32 undef, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 1, i32 1, i32 16, i32 0, i32 0, i32 0), "gc-live"() ]
unreachable
bb35: ; preds = %bb67
%tmp36 = invoke token (i64, i32, i32 (i32, i8 addrspace(1)*, i32, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32i32p1i8i32i32i32f(i64 1, i32 16, i32 (i32, i8 addrspace(1)*, i32, i32, i32)* nonnull @hoge.1, i32 5, i32 0, i32 undef, i8 addrspace(1)* %tmp71, i32 %tmp4, i32 undef, i32 undef, i32 0, i32 0) [ "deopt"(i32 0, i32 8, i32 0, i32 300, i32 2, i32 19, i32 0, i32 0, i8 addrspace(1)* %tmp71, i32 3, i32 undef, i32 0, i8 addrspace(1)* null, i32 3, i32 %tmp1, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp69, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp70, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* %tmp71, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* null, i8 addrspace(1)* %tmp69, i8 addrspace(1)* %tmp70, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp71, i8 addrspace(1)* %tmp72, i8 addrspace(1)* undef) ]
to label %bb37 unwind label %bb79
bb37: ; preds = %bb35
%tmp38 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp36, i32 1, i32 1) ; (%tmp69, %tmp69)
%tmp39 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp36, i32 6, i32 6) ; (%tmp72, %tmp72)
%tmp40 = invoke token (i64, i32, i32 (i32, i8 addrspace(1)*, i32, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32i32p1i8i32i32i32f(i64 1, i32 16, i32 (i32, i8 addrspace(1)*, i32, i32, i32)* nonnull @hoge.1, i32 5, i32 0, i32 undef, i8 addrspace(1)* undef, i32 undef, i32 undef, i32 -7122, i32 0, i32 0) [ "deopt"(i32 0, i32 8, i32 0, i32 308, i32 0, i32 19, i32 0, i32 0, i8 addrspace(1)* null, i32 3, i32 %tmp1, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp38, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* null, i8 addrspace(1)* %tmp38, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp39, i8 addrspace(1)* undef) ]
to label %bb41 unwind label %bb85
bb41: ; preds = %bb37
%tmp42 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp40, i32 6, i32 6) ; (%tmp39, %tmp39)
%tmp43 = getelementptr inbounds i8, i8 addrspace(1)* %tmp42, i64 904
%tmp44 = bitcast i8 addrspace(1)* %tmp43 to i8 addrspace(1)* addrspace(1)*
%tmp45 = load atomic i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* %tmp44 unordered, align 8
%tmp46 = icmp eq i8 addrspace(1)* %tmp45, null
%tmp47 = xor i64 0, -1
%tmp48 = inttoptr i64 %tmp47 to i8 addrspace(1)*
%tmp49 = select i1 %tmp46, i8 addrspace(1)* null, i8 addrspace(1)* %tmp48
br i1 undef, label %bb52, label %bb50
bb50: ; preds = %bb41
%0 = bitcast i8 addrspace(1)* %tmp43 to i8 addrspace(1)* addrspace(1)*
%tmp51 = call i8 addrspace(1)* @wombat(i8 addrspace(1)* %tmp49, i8 addrspace(1)* addrspace(1)* %0)
br label %bb52
bb52: ; preds = %bb50, %bb41
%tmp53 = invoke token (i64, i32, i32 (i32, i8 addrspace(1)*, i32, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32i32p1i8i32i32i32f(i64 1, i32 16, i32 (i32, i8 addrspace(1)*, i32, i32, i32)* nonnull @hoge.1, i32 5, i32 0, i32 undef, i8 addrspace(1)* undef, i32 undef, i32 undef, i32 undef, i32 0, i32 0) [ "deopt"(i32 0, i32 0, i32 0, i32 335, i32 2, i32 19, i32 0, i32 0, i8 addrspace(1)* undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 3, i32 undef, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp42, i8 addrspace(1)* undef) ]
to label %bb54 unwind label %bb90
bb54: ; preds = %bb52
%tmp55 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @ham, i32 1, i32 2, i32 10, i32 0, i32 0) [ "deopt"(i32 0, i32 1, i32 0, i32 344, i32 4, i32 19, i32 0, i32 0, i8 addrspace(1)* null, i32 3, i32 undef, i32 4, i64 undef, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 3, i32 undef, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"() ]
unreachable
bb56: ; preds = %bb23
%tmp57 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp30, i32 1, i32 1) ; (%tmp27, %tmp27)
%tmp58 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp30, i32 2, i32 2) ; (%tmp24, %tmp24)
%tmp59 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp30, i32 5, i32 5) ; (%tmp26, %tmp26)
%tmp60 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp30, i32 6, i32 6) ; (%tmp28, %tmp28)
%tmp61 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp30, i32 7, i32 7) ; (%tmp29, %tmp29)
%tmp62 = invoke token (i64, i32, i32 (i32, i8 addrspace(1)*, i32, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32i32p1i8i32i32i32f(i64 1, i32 16, i32 (i32, i8 addrspace(1)*, i32, i32, i32)* nonnull @hoge.1, i32 5, i32 0, i32 undef, i8 addrspace(1)* %tmp59, i32 %tmp1, i32 7, i32 %tmp3, i32 0, i32 0) [ "deopt"(i32 0, i32 8, i32 0, i32 208, i32 4, i32 19, i32 0, i32 0, i8 addrspace(1)* %tmp57, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* null, i32 0, i8 addrspace(1)* null, i32 3, i32 %tmp1, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 %tmp4, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp57, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp58, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* %tmp59, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* %tmp57, i8 addrspace(1)* %tmp58, i8 addrspace(1)* undef, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp59, i8 addrspace(1)* null, i8 addrspace(1)* %tmp60, i8 addrspace(1)* %tmp61) ]
to label %bb63 unwind label %bb67
bb63: ; preds = %bb56
%tmp64 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @ham, i32 1, i32 2, i32 10, i32 0, i32 0) [ "deopt"(i32 0, i32 9, i32 0, i32 215, i32 8, i32 19, i32 0, i32 0, i8 addrspace(1)* null, i32 7, i32 undef, i32 7, i32 undef, i32 7, double undef, i32 7, i8* null, i32 0, i8 addrspace(1)* null, i32 4, double undef, i32 7, i8* null, i32 0, i8 addrspace(1)* null, i32 3, i32 %tmp1, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 2, i32 3, i32 undef, i32 3, i32 %tmp4, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"() ]
unreachable
bb65: ; preds = %bb23
%tmp66 = landingpad token
cleanup
unreachable
bb67: ; preds = %bb56
%tmp68 = landingpad token
cleanup
%tmp69 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp68, i32 0, i32 0) ; (%tmp57, %tmp57)
%tmp70 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp68, i32 1, i32 1) ; (%tmp58, %tmp58)
%tmp71 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp68, i32 4, i32 4) ; (%tmp59, %tmp59)
%tmp72 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp68, i32 6, i32 6) ; (%tmp60, %tmp60)
switch i32 undef, label %bb99 [
i32 66, label %bb35
i32 57, label %bb31
]
bb75: ; preds = %bb12
%tmp76 = landingpad token
cleanup
unreachable
bb77: ; preds = %bb31
%tmp78 = landingpad token
cleanup
br label %bb95
bb79: ; preds = %bb35
%tmp80 = landingpad token
cleanup
%tmp81 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp80, i32 5, i32 5) ; (%tmp71, %tmp71)
%tmp84 = load i8 addrspace(1)*, i8 addrspace(1)* addrspace(256)* inttoptr (i64 8 to i8 addrspace(1)* addrspace(256)*), align 8
br label %bb99
bb85: ; preds = %bb37
%tmp86 = landingpad token
cleanup
%tmp87 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp86, i32 6, i32 6) ; (%tmp39, %tmp39)
br label %bb99
bb90: ; preds = %bb52
%tmp91 = landingpad token
cleanup
%tmp92 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp91, i32 7, i32 7) ; (%tmp42, %tmp42)
br label %bb95
bb93: ; preds = %bb
%tmp94 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @ham, i32 1, i32 2, i32 14, i32 0, i32 0) [ "deopt"(i32 0, i32 1, i32 0, i32 94, i32 4, i32 19, i32 0, i32 3, float undef, i32 0, i8 addrspace(1)* %tmp6, i32 0, i8 addrspace(1)* %tmp7, i32 3, i32 -170, i32 0, i8 addrspace(1)* %tmp, i32 3, i32 %tmp1, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 %tmp4, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp5, i32 3, float undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp6, i32 0, i8 addrspace(1)* %tmp7, i32 0, i8 addrspace(1)* %tmp8, i32 0, i8 addrspace(1)* %tmp9, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"() ]
unreachable
bb95: ; preds = %bb114, %bb90, %bb77
%tmp96 = phi i8 addrspace(1)* [ undef, %bb114 ], [ undef, %bb77 ], [ %tmp92, %bb90 ]
%tmp97 = getelementptr inbounds i8, i8 addrspace(1)* %tmp96, i64 928
%tmp98 = bitcast i8 addrspace(1)* %tmp97 to i64 addrspace(1)*
store atomic i64 undef, i64 addrspace(1)* %tmp98 unordered, align 8
ret float undef
bb99: ; preds = %bb85, %bb79, %bb67
%tmp101 = phi i8 addrspace(1)* [ %tmp87, %bb85 ], [ undef, %bb79 ], [ %tmp72, %bb67 ]
%tmp102 = phi i8 addrspace(1)* [ undef, %bb85 ], [ %tmp81, %bb79 ], [ %tmp71, %bb67 ]
%tmp103 = phi i8 addrspace(1)* [ undef, %bb85 ], [ undef, %bb79 ], [ %tmp69, %bb67 ]
%tmp104 = phi i8 addrspace(1)* [ undef, %bb85 ], [ %tmp84, %bb79 ], [ undef, %bb67 ]
%sunkaddr = getelementptr inbounds i8, i8 addrspace(1)* %tmp101, i64 904
%1 = bitcast i8 addrspace(1)* %sunkaddr to i8 addrspace(1)* addrspace(1)*
%tmp105 = load atomic i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* %1 unordered, align 8
%tmp106 = icmp eq i8 addrspace(1)* %tmp105, null
%tmp107 = xor i64 0, -1
%tmp108 = inttoptr i64 %tmp107 to i8 addrspace(1)*
%tmp109 = select i1 %tmp106, i8 addrspace(1)* null, i8 addrspace(1)* %tmp108
%tmp110 = invoke token (i64, i32, i32 (i32, i8 addrspace(1)*, i32, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i32i32p1i8i32i32i32f(i64 1, i32 16, i32 (i32, i8 addrspace(1)*, i32, i32, i32)* nonnull @hoge.1, i32 5, i32 0, i32 undef, i8 addrspace(1)* %tmp102, i32 undef, i32 undef, i32 undef, i32 0, i32 0) [ "deopt"(i32 0, i32 0, i32 0, i32 572, i32 2, i32 19, i32 0, i32 0, i8 addrspace(1)* %tmp109, i32 3, i32 undef, i32 7, i8* null, i32 3, i32 undef, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* %tmp103, i32 3, float undef, i32 3, i32 undef, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp104, i32 7, i8* null), "gc-live"(i8 addrspace(1)* %tmp109, i8 addrspace(1)* %tmp103, i8 addrspace(1)* %tmp104, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp101) ]
to label %bb111 unwind label %bb114
bb111: ; preds = %bb99
%tmp112 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp110, i32 4, i32 4) ; (%tmp101, %tmp101)
%tmp113 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @ham, i32 1, i32 2, i32 10, i32 0, i32 0) [ "deopt"(i32 0, i32 1, i32 0, i32 581, i32 4, i32 19, i32 0, i32 0, i8 addrspace(1)* null, i32 3, i32 undef, i32 4, i64 undef, i32 7, i8* null, i32 7, i8* null, i32 3, i32 undef, i32 3, i32 %tmp2, i32 3, i32 %tmp3, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 3, float undef, i32 3, i32 undef, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 7, i8* null), "gc-live"() ]
unreachable
bb114: ; preds = %bb99
%tmp115 = landingpad token
cleanup
br label %bb95
}
declare i32* @widget()
declare float @quux(i32, i8 addrspace(1)*, i64, i32)
declare i32 @hoge.1(i32, i8 addrspace(1)*, i32, i32, i32)
declare void @barney()
declare void @ham(i32)
declare token @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 immarg, i32 immarg, void (i32)*, i32 immarg, i32 immarg, ...)
; Function Attrs: nounwind readnone
declare i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token, i32 immarg, i32 immarg) #0
declare token @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 immarg, i32 immarg, void ()*, i32 immarg, i32 immarg, ...)
declare token @llvm.experimental.gc.statepoint.p0f_f32i32p1i8i64i32f(i64 immarg, i32 immarg, float (i32, i8 addrspace(1)*, i64, i32)*, i32 immarg, i32 immarg, ...)
declare token @llvm.experimental.gc.statepoint.p0f_i32i32p1i8i32i32i32f(i64 immarg, i32 immarg, i32 (i32, i8 addrspace(1)*, i32, i32, i32)*, i32 immarg, i32 immarg, ...)
declare i8 addrspace(1)* @wombat(i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)*)
attributes #0 = { nounwind readnone }
...
---
name: hoge
alignment: 16
exposesReturnsTwice: false
legalized: false
regBankSelected: false
selected: false
failedISel: false
tracksRegLiveness: true
hasWinCFI: false
registers:
- { id: 0, class: gr64, preferred-register: '' }
- { id: 1, class: gr32, preferred-register: '' }
- { id: 2, class: gr32, preferred-register: '' }
- { id: 3, class: gr32, preferred-register: '' }
- { id: 4, class: gr32, preferred-register: '' }
- { id: 5, class: gr64, preferred-register: '' }
- { id: 6, class: gr64, preferred-register: '' }
- { id: 7, class: gr64, preferred-register: '' }
- { id: 8, class: gr64, preferred-register: '' }
- { id: 9, class: gr64, preferred-register: '' }
- { id: 10, class: gr64, preferred-register: '' }
- { id: 11, class: gr64, preferred-register: '' }
- { id: 12, class: gr64, preferred-register: '' }
- { id: 13, class: gr64, preferred-register: '' }
- { id: 14, class: gr64, preferred-register: '' }
- { id: 15, class: gr64, preferred-register: '' }
- { id: 16, class: gr64, preferred-register: '' }
- { id: 17, class: gr64, preferred-register: '' }
- { id: 18, class: gr64, preferred-register: '' }
- { id: 19, class: gr64, preferred-register: '' }
- { id: 20, class: gr64, preferred-register: '' }
- { id: 21, class: gr64, preferred-register: '' }
- { id: 22, class: gr64, preferred-register: '' }
- { id: 23, class: gr64, preferred-register: '' }
- { id: 24, class: gr64, preferred-register: '' }
- { id: 25, class: gr64, preferred-register: '' }
- { id: 26, class: gr64, preferred-register: '' }
- { id: 27, class: gr64, preferred-register: '' }
- { id: 28, class: gr64, preferred-register: '' }
- { id: 29, class: gr64, preferred-register: '' }
- { id: 30, class: gr64, preferred-register: '' }
- { id: 31, class: gr32, preferred-register: '' }
- { id: 32, class: gr8, preferred-register: '' }
- { id: 33, class: gr32, preferred-register: '' }
- { id: 34, class: gr64, preferred-register: '' }
- { id: 35, class: gr64, preferred-register: '' }
- { id: 36, class: gr64, preferred-register: '' }
- { id: 37, class: gr64, preferred-register: '' }
- { id: 38, class: gr64, preferred-register: '' }
- { id: 39, class: gr64, preferred-register: '' }
- { id: 40, class: gr64, preferred-register: '' }
- { id: 41, class: gr64, preferred-register: '' }
- { id: 42, class: gr64, preferred-register: '' }
- { id: 43, class: gr64, preferred-register: '' }
- { id: 44, class: gr64, preferred-register: '' }
- { id: 45, class: gr64, preferred-register: '' }
- { id: 46, class: gr64, preferred-register: '' }
- { id: 47, class: gr64, preferred-register: '' }
- { id: 48, class: gr64, preferred-register: '' }
- { id: 49, class: gr64, preferred-register: '' }
- { id: 50, class: gr64, preferred-register: '' }
- { id: 51, class: gr64, preferred-register: '' }
- { id: 52, class: gr32, preferred-register: '' }
- { id: 53, class: gr64, preferred-register: '' }
- { id: 54, class: gr32, preferred-register: '' }
- { id: 55, class: gr64, preferred-register: '' }
- { id: 56, class: gr64, preferred-register: '' }
- { id: 57, class: gr64, preferred-register: '' }
- { id: 58, class: gr32, preferred-register: '' }
- { id: 59, class: gr64, preferred-register: '' }
- { id: 60, class: fr32, preferred-register: '' }
- { id: 61, class: gr64, preferred-register: '' }
- { id: 62, class: gr64, preferred-register: '' }
- { id: 63, class: gr64, preferred-register: '' }
- { id: 64, class: gr64, preferred-register: '' }
- { id: 65, class: gr64, preferred-register: '' }
- { id: 66, class: gr64, preferred-register: '' }
- { id: 67, class: gr64, preferred-register: '' }
- { id: 68, class: gr32, preferred-register: '' }
- { id: 69, class: gr32, preferred-register: '' }
- { id: 70, class: gr64, preferred-register: '' }
- { id: 71, class: gr64, preferred-register: '' }
- { id: 72, class: gr32, preferred-register: '' }
- { id: 73, class: gr64, preferred-register: '' }
- { id: 74, class: gr64, preferred-register: '' }
- { id: 75, class: gr64, preferred-register: '' }
- { id: 76, class: gr64, preferred-register: '' }
- { id: 77, class: gr64, preferred-register: '' }
- { id: 78, class: gr64, preferred-register: '' }
- { id: 79, class: gr32, preferred-register: '' }
- { id: 80, class: gr32, preferred-register: '' }
- { id: 81, class: gr64, preferred-register: '' }
- { id: 82, class: gr32, preferred-register: '' }
- { id: 83, class: gr64, preferred-register: '' }
- { id: 84, class: gr64, preferred-register: '' }
- { id: 85, class: gr64, preferred-register: '' }
- { id: 86, class: gr32, preferred-register: '' }
- { id: 87, class: gr8, preferred-register: '' }
- { id: 88, class: gr32, preferred-register: '' }
- { id: 89, class: gr8, preferred-register: '' }
- { id: 90, class: gr32, preferred-register: '' }
- { id: 91, class: gr32, preferred-register: '' }
- { id: 92, class: gr32, preferred-register: '' }
- { id: 93, class: gr64, preferred-register: '' }
- { id: 94, class: gr64, preferred-register: '' }
- { id: 95, class: gr64, preferred-register: '' }
- { id: 96, class: gr64, preferred-register: '' }
- { id: 97, class: gr32, preferred-register: '' }
- { id: 98, class: gr64, preferred-register: '' }
- { id: 99, class: gr64, preferred-register: '' }
- { id: 100, class: gr64, preferred-register: '' }
- { id: 101, class: gr32, preferred-register: '' }
- { id: 102, class: gr64, preferred-register: '' }
- { id: 103, class: gr64, preferred-register: '' }
- { id: 104, class: gr64, preferred-register: '' }
- { id: 105, class: gr32, preferred-register: '' }
- { id: 106, class: gr32, preferred-register: '' }
- { id: 107, class: gr32, preferred-register: '' }
- { id: 108, class: gr64, preferred-register: '' }
- { id: 109, class: gr64, preferred-register: '' }
- { id: 110, class: gr32, preferred-register: '' }
- { id: 111, class: gr64, preferred-register: '' }
- { id: 112, class: gr64, preferred-register: '' }
- { id: 113, class: gr64, preferred-register: '' }
- { id: 114, class: gr64, preferred-register: '' }
- { id: 115, class: gr32, preferred-register: '' }
- { id: 116, class: gr32, preferred-register: '' }
- { id: 117, class: gr64, preferred-register: '' }
- { id: 118, class: gr32, preferred-register: '' }
- { id: 119, class: gr32, preferred-register: '' }
- { id: 120, class: gr64, preferred-register: '' }
- { id: 121, class: gr64, preferred-register: '' }
- { id: 122, class: gr32, preferred-register: '' }
- { id: 123, class: gr64, preferred-register: '' }
- { id: 124, class: gr64, preferred-register: '' }
- { id: 125, class: gr64, preferred-register: '' }
- { id: 126, class: gr64, preferred-register: '' }
- { id: 127, class: gr64, preferred-register: '' }
- { id: 128, class: gr32, preferred-register: '' }
- { id: 129, class: gr8, preferred-register: '' }
- { id: 130, class: gr64, preferred-register: '' }
- { id: 131, class: gr64, preferred-register: '' }
- { id: 132, class: gr32, preferred-register: '' }
- { id: 133, class: gr64, preferred-register: '' }
- { id: 134, class: gr32, preferred-register: '' }
- { id: 135, class: gr32, preferred-register: '' }
- { id: 136, class: gr32, preferred-register: '' }
- { id: 137, class: gr64, preferred-register: '' }
- { id: 138, class: gr32, preferred-register: '' }
- { id: 139, class: gr64, preferred-register: '' }
- { id: 140, class: gr64, preferred-register: '' }
- { id: 141, class: gr32, preferred-register: '' }
- { id: 142, class: gr64, preferred-register: '' }
- { id: 143, class: gr64, preferred-register: '' }
- { id: 144, class: gr64, preferred-register: '' }
- { id: 145, class: gr64, preferred-register: '' }
- { id: 146, class: gr32, preferred-register: '' }
- { id: 147, class: gr32, preferred-register: '' }
- { id: 148, class: gr32, preferred-register: '' }
- { id: 149, class: gr32, preferred-register: '' }
- { id: 150, class: gr64, preferred-register: '' }
- { id: 151, class: gr64, preferred-register: '' }
- { id: 152, class: gr64, preferred-register: '' }
- { id: 153, class: gr64, preferred-register: '' }
- { id: 154, class: gr32, preferred-register: '' }
- { id: 155, class: gr64, preferred-register: '' }
- { id: 156, class: gr64, preferred-register: '' }
- { id: 157, class: gr64, preferred-register: '' }
- { id: 158, class: gr64, preferred-register: '' }
- { id: 159, class: fr32, preferred-register: '' }
- { id: 160, class: gr32, preferred-register: '' }
- { id: 161, class: gr32, preferred-register: '' }
- { id: 162, class: gr64, preferred-register: '' }
- { id: 163, class: gr64, preferred-register: '' }
- { id: 164, class: gr64, preferred-register: '' }
- { id: 165, class: gr64, preferred-register: '' }
- { id: 166, class: gr64, preferred-register: '' }
liveins: []
frameInfo:
isFrameAddressTaken: false
isReturnAddressTaken: false
hasStackMap: false
hasPatchPoint: false
stackSize: 0
offsetAdjustment: 0
maxAlignment: 1
adjustsStack: false
hasCalls: true
stackProtector: ''
maxCallFrameSize: 4294967295
cvBytesOfCalleeSavedRegisters: 0
hasOpaqueSPAdjustment: false
hasVAStart: false
hasMustTailInVarArgFunc: false
hasTailCall: false
localFrameSize: 0
savePoint: ''
restorePoint: ''
fixedStack: []
stack: []
callSites: []
debugValueSubstitutions: []
constants: []
machineFunctionInfo: {}
body: |
bb.0.bb:
successors: %bb.1(0x80000000), %bb.21(0x00000000)
%0:gr64 = MOV64rm $noreg, 1, $noreg, 0, $noreg :: (load 8 from `i8 addrspace(1)* addrspace(3)* null`, addrspace 3)
%2:gr32 = MOV32rm undef %29:gr64, 1, $noreg, 0, $noreg :: (load 4 from `i32 addrspace(3)* undef`, addrspace 3)
%1:gr32 = COPY %2
%4:gr32 = MOV32rm $noreg, 1, $noreg, 0, $noreg :: (load 4 from `i32 addrspace(3)* null`, addrspace 3)
%3:gr32 = COPY %4
%9:gr64 = MOV64rm undef %30:gr64, 1, $noreg, 0, $noreg :: (load 8 from `i8 addrspace(1)* addrspace(3)* undef`, addrspace 3)
%5:gr64 = COPY %9
%31:gr32 = MOV32r0 implicit-def dead $eflags
%32:gr8 = COPY killed %31.sub_8bit
TEST8rr killed %32, %32, implicit-def $eflags
JCC_1 %bb.21, 5, implicit killed $eflags
JMP_1 %bb.1
bb.1.bb12:
successors: %bb.2(0x80000000), %bb.16(0x00000000)
%52:gr32 = MOV32rm undef %53:gr64, 1, $noreg, 0, $noreg :: (load unordered 4 from `i32 addrspace(1)* undef`, addrspace 1)
%54:gr32 = COPY killed %52
%54:gr32 = AND32ri %54, 33554431, implicit-def dead $eflags
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%55:gr64 = COPY killed %0
%43:gr64 = COPY killed %9
%42:gr64 = COPY %5
%44:gr64 = COPY %5
%45:gr64 = COPY %5
%56:gr64 = COPY killed %5
%40:gr64, %41:gr64, %42:gr64, %43:gr64, %44:gr64, %45:gr64, dead %55:gr64, dead %56:gr64 = STATEPOINT 2882400000, 0, 0, target-flags(x86-plt) @barney, 2, 0, 2, 0, 2, 45, 2, 0, 2, 1, 2, 0, 2, 83, 2, 0, 2, 19, 2, 0, 2, 0, %55, 2, 3, %1, 2, 3, %2, 2, 3, %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, %4, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %56, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %56, 2, 0, %56, 2, 0, %56, 2, 0, %43, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, undef %40(tied-def 0), undef %41(tied-def 1), %42(tied-def 2), %43(tied-def 3), %44(tied-def 4), %45(tied-def 5), %55(tied-def 6), %56(tied-def 7), 2, 0, 2, 8, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp0>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%57:gr64 = MOV64ri32 -170
$edi = COPY killed %54
$rsi = COPY %45
$rdx = COPY killed %57
%51:gr64 = COPY killed %45
%46:gr64 = COPY killed %40
%48:gr64 = COPY killed %42
%50:gr64 = COPY killed %44
%47:gr64 = COPY killed %41
%49:gr64 = COPY killed %43
%46:gr64, %47:gr64, %48:gr64, %49:gr64, %50:gr64, %51:gr64 = STATEPOINT 1, 16, 4, undef %59:gr64, killed $edi, killed $rsi, killed $rdx, undef $ecx, 2, 0, 2, 0, 2, 47, 2, 0, 2, 0, 2, 0, 2, 103, 2, 1, 2, 19, 2, 0, 2, 3, 2, 4278124286, 2, 0, 2, 0, 2, 3, %1, 2, 3, %2, 2, 3, %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, %4, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %48, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %51, 2, 0, %50, 2, 0, 2, 4278124286, 2, 0, %49, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, %46(tied-def 0), %47(tied-def 1), %48(tied-def 2), %49(tied-def 3), %50(tied-def 4), %51(tied-def 5), 2, 0, 2, 4278124286, 2, 0, 2, 8, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def dead $xmm0
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp1>
JMP_1 %bb.2
bb.2.bb23:
successors: %bb.11(0x80000000), %bb.13(0x00000000)
EH_LABEL <mcsymbol .Ltmp2>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$rsi = COPY %49
$ecx = COPY %4
$r8d = COPY %4
%64:gr64 = COPY killed %47
%65:gr64 = COPY killed %49
%66:gr64 = COPY killed %51
%63:gr64 = COPY killed %46
%67:gr64 = COPY killed %48
%70:gr64 = COPY killed %50
dead %63:gr64, %64:gr64, %65:gr64, %66:gr64, %67:gr64, dead %70:gr64 = STATEPOINT 1, 16, 5, undef %71:gr64, undef $edi, killed $rsi, undef $edx, killed $ecx, killed $r8d, 2, 0, 2, 0, 2, 53, 2, 0, 2, 8, 2, 0, 2, 153, 2, 4, 2, 19, 2, 0, 2, 4, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 0, 2, 3, %1, 2, 3, %2, 2, 3, %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, %4, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %67, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %66, 2, 0, %70, 2, 0, 2, 4278124286, 2, 0, %65, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 8, %63(tied-def 0), %64(tied-def 1), %65(tied-def 2), %66(tied-def 3), %67(tied-def 4), 2, 4278124286, 2, 0, %70(tied-def 5), 2, 0, 2, 8, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp3>
JMP_1 %bb.11
bb.3.bb31:
successors: %bb.4(0x00000000), %bb.17(0x80000000)
EH_LABEL <mcsymbol .Ltmp4>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$rsi = COPY %76
$edx = COPY %4
%93:gr64 = COPY killed %78
%94:gr64 = COPY killed %77
%95:gr64 = COPY killed %76
dead %93:gr64, dead %94:gr64, dead %95:gr64 = STATEPOINT 1, 16, 5, undef %96:gr64, undef $edi, killed $rsi, killed $edx, undef $ecx, undef $r8d, 2, 0, 2, 0, 2, 49, 2, 0, 2, 0, 2, 0, 2, 537, 2, 2, 2, 19, 2, 0, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 0, 2, 3, 2, 4278124286, 2, 3, killed %2, 2, 3, %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, %4, 2, 3, 2, 1, 2, 3, 2, 4278124286, 2, 0, %93, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %94, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, %95, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 5, 2, 4278124286, 2, 0, %93(tied-def 0), %94(tied-def 1), %95(tied-def 2), 2, 0, 2, 5, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp5>
JMP_1 %bb.4
bb.4.bb33:
successors:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%101:gr32 = MOV32ri 15
$edi = COPY killed %101
STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, killed $edi, 2, 0, 2, 0, 2, 51, 2, 0, 2, 2, 2, 0, 2, 591, 2, 0, 2, 19, 2, 0, 2, 7, 2, 0, 2, 3, 2, 4278124286, 2, 3, 2, 63, 2, 3, killed %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, killed %4, 2, 3, 2, 1, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 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, 1, 2, 1, 2, 16, 2, 0, 2, 0, 2, 0, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.5.bb35:
successors: %bb.6(0x40000000), %bb.18(0x40000000)
EH_LABEL <mcsymbol .Ltmp6>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$rsi = COPY %76
$edx = COPY killed %4
%103:gr64 = COPY killed %78
%102:gr64 = COPY killed %75
%108:gr64 = COPY killed %77
%104:gr64 = COPY killed %76
%102:gr64, %103:gr64, %104:gr64, dead %108:gr64 = STATEPOINT 1, 16, 5, undef %109:gr64, undef $edi, killed $rsi, killed $edx, undef $ecx, undef $r8d, 2, 0, 2, 0, 2, 49, 2, 0, 2, 8, 2, 0, 2, 300, 2, 2, 2, 19, 2, 0, 2, 0, %104, 2, 3, 2, 4278124286, 2, 0, 2, 0, 2, 3, %1, 2, 3, %2, 2, 3, %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %103, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %108, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, %104, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 6, %102(tied-def 0), %103(tied-def 1), %104(tied-def 2), 2, 0, %108(tied-def 3), 2, 4278124286, 2, 0, 2, 6, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp7>
JMP_1 %bb.6
bb.6.bb37:
successors: %bb.7(0x40000000), %bb.19(0x40000000)
EH_LABEL <mcsymbol .Ltmp8>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%115:gr32 = MOV32ri -7122
$r8d = COPY killed %115
%120:gr64 = COPY killed %103
%114:gr64 = COPY killed %102
%114:gr64, dead %120:gr64 = STATEPOINT 1, 16, 5, undef %121:gr64, undef $edi, undef $rsi, undef $edx, undef $ecx, killed $r8d, 2, 0, 2, 0, 2, 45, 2, 0, 2, 8, 2, 0, 2, 308, 2, 0, 2, 19, 2, 0, 2, 0, 2, 0, 2, 3, killed %1, 2, 3, %2, 2, 3, %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %120, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 4, %114(tied-def 0), 2, 0, %120(tied-def 1), 2, 4278124286, 2, 0, 2, 4, 0, 0, 1, 1, 2, 2, 3, 3, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp9>
JMP_1 %bb.7
bb.7.bb41:
successors: %bb.9(0x40000000), %bb.8(0x40000000)
%12:gr64 = COPY %114
%126:gr64 = MOV64rm %114, 1, $noreg, 904, $noreg :: (load unordered 8 from %ir.tmp44, addrspace 1)
%127:gr64 = COPY killed %126
dead %127:gr64 = NEG64r %127, implicit-def $eflags
%14:gr64 = SETB_C64r implicit-def dead $eflags, implicit killed $eflags
%128:gr32 = MOV32r0 implicit-def dead $eflags
%129:gr8 = COPY killed %128.sub_8bit
TEST8rr killed %129, %129, implicit-def $eflags
JCC_1 %bb.9, 5, implicit killed $eflags
JMP_1 %bb.8
bb.8.bb50:
successors: %bb.9(0x80000000)
%13:gr64 = COPY killed %114
%13:gr64 = nuw ADD64ri32 %13, 904, implicit-def dead $eflags
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$rdi = COPY killed %14
$rsi = COPY killed %13
CALL64pcrel32 target-flags(x86-plt) @wombat, csr_64, implicit $rsp, implicit $ssp, implicit killed $rdi, implicit killed $rsi, implicit-def $rsp, implicit-def $ssp, implicit-def dead $rax
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.9.bb52:
successors: %bb.10(0x00000000), %bb.20(0x80000000)
EH_LABEL <mcsymbol .Ltmp10>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%131:gr64 = COPY killed %12
%131:gr64 = STATEPOINT 1, 16, 5, undef %137:gr64, undef $edi, undef $rsi, undef $edx, undef $ecx, undef $r8d, 2, 0, 2, 0, 2, 49, 2, 0, 2, 0, 2, 0, 2, 335, 2, 2, 2, 19, 2, 0, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, %2, 2, 3, %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 2, %131(tied-def 0), 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp11>
JMP_1 %bb.10
bb.10.bb54:
successors:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%141:gr32 = MOV32ri 10
$edi = COPY killed %141
STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, killed $edi, 2, 0, 2, 2, 2, 53, 2, 0, 2, 1, 2, 0, 2, 344, 2, 4, 2, 19, 2, 0, 2, 0, 2, 0, 2, 3, 2, 4278124286, 2, 4, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, killed %2, 2, 3, killed %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 2, 2, 0, 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.11.bb56:
successors: %bb.12(0x00000000), %bb.14(0x80000000)
EH_LABEL <mcsymbol .Ltmp12>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%79:gr32 = MOV32ri 7
$rsi = COPY %65
$edx = COPY %1
$ecx = COPY killed %79
$r8d = COPY %3
%75:gr64 = COPY killed %64
%77:gr64 = COPY killed %66
%76:gr64 = COPY killed %65
%78:gr64 = COPY killed %67
%75:gr64, %76:gr64, %77:gr64, %78:gr64 = STATEPOINT 1, 16, 5, undef %81:gr64, undef $edi, killed $rsi, killed $edx, killed $ecx, killed $r8d, 2, 0, 2, 0, 2, 53, 2, 0, 2, 8, 2, 0, 2, 208, 2, 4, 2, 19, 2, 0, 2, 0, %78, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 0, 2, 0, 2, 0, 2, 3, %1, 2, 3, %2, 2, 3, %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, %4, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %78, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %77, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, %76, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 6, %75(tied-def 0), %76(tied-def 1), %77(tied-def 2), %78(tied-def 3), 2, 0, 2, 4278124286, 2, 0, 2, 6, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp13>
JMP_1 %bb.12
bb.12.bb63:
successors:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%161:gr32 = MOV32ri 10
$edi = COPY killed %161
STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, killed $edi, 2, 0, 2, 2, 2, 61, 2, 0, 2, 9, 2, 0, 2, 215, 2, 8, 2, 19, 2, 0, 2, 0, 2, 0, 2, 7, 2, 4278124286, 2, 7, 2, 4278124286, 2, 7, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 0, 2, 4, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 0, 2, 3, killed %1, 2, 3, killed %2, 2, 3, killed %3, 2, 3, 2, 2, 2, 3, 2, 4278124286, 2, 3, killed %4, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 2, 2, 0, 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.13.bb65 (landing-pad):
successors:
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp14>
bb.14.bb67 (landing-pad):
successors: %bb.3(0x2aaaaaab), %bb.15(0x55555555)
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp15>
%86:gr32 = MOV32r0 implicit-def dead $eflags
%87:gr8 = COPY killed %86.sub_8bit
TEST8rr killed %87, %87, implicit-def $eflags
JCC_1 %bb.3, 5, implicit killed $eflags
JMP_1 %bb.15
bb.15.bb67:
successors: %bb.5(0x40000001), %bb.26(0x3fffffff)
%88:gr32 = MOV32r0 implicit-def dead $eflags
%89:gr8 = COPY killed %88.sub_8bit
TEST8rr killed %89, %89, implicit-def $eflags
JCC_1 %bb.5, 5, implicit killed $eflags
bb.26:
successors: %bb.23(0x80000000)
%163:gr64 = COPY killed %75
%164:gr64 = COPY killed %76
%165:gr64 = COPY killed %78
%166:gr64 = IMPLICIT_DEF
JMP_1 %bb.23
bb.16.bb75 (landing-pad):
successors:
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp16>
bb.17.bb77 (landing-pad):
successors: %bb.22(0x80000000)
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp17>
%162:gr64 = IMPLICIT_DEF
JMP_1 %bb.22
bb.18.bb79 (landing-pad):
successors: %bb.23(0x80000000)
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp18>
%19:gr64 = COPY killed %104
%20:gr64 = MOV64rm $noreg, 1, $noreg, 8, $gs :: (load 8 from `i8 addrspace(1)* addrspace(256)* inttoptr (i64 8 to i8 addrspace(1)* addrspace(256)*)`, addrspace 256)
%163:gr64 = IMPLICIT_DEF
%164:gr64 = COPY killed %19
%165:gr64 = IMPLICIT_DEF
%166:gr64 = COPY killed %20
JMP_1 %bb.23
bb.19.bb85 (landing-pad):
successors: %bb.23(0x80000000)
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp19>
%21:gr64 = COPY killed %114
%163:gr64 = COPY killed %21
%164:gr64 = IMPLICIT_DEF
%165:gr64 = IMPLICIT_DEF
%166:gr64 = IMPLICIT_DEF
JMP_1 %bb.23
bb.20.bb90 (landing-pad):
successors: %bb.22(0x80000000)
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp20>
%22:gr64 = COPY killed %131
%162:gr64 = COPY killed %22
JMP_1 %bb.22
bb.21.bb93:
successors:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%33:gr32 = MOV32ri 14
$edi = COPY killed %33
%36:gr64 = COPY killed %0
%39:gr64 = COPY killed %9
%34:gr64 = COPY %5
%35:gr64 = COPY %5
%37:gr64 = COPY %5
%38:gr64 = COPY killed %5
dead %34:gr64, dead %35:gr64, dead %36:gr64, dead %37:gr64, dead %38:gr64, dead %39:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, killed $edi, 2, 0, 2, 2, 2, 53, 2, 0, 2, 1, 2, 0, 2, 94, 2, 4, 2, 19, 2, 0, 2, 3, 2, 4278124286, 2, 0, %38, 2, 0, %38, 2, 3, 2, -170, 2, 0, %36, 2, 3, killed %1, 2, 3, killed %2, 2, 3, killed %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, killed %4, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %38, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %38, 2, 0, %38, 2, 0, %38, 2, 0, %39, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 6, %34(tied-def 0), %35(tied-def 1), %36(tied-def 2), %37(tied-def 3), %38(tied-def 4), %39(tied-def 5), 2, 0, 2, 6, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.22.bb95:
%23:gr64 = COPY killed %162
MOV64mr killed %23, 1, $noreg, 928, $noreg, undef %158:gr64 :: (store unordered 8 into %ir.tmp98, addrspace 1)
RET 0, undef $xmm0
bb.23.bb99:
successors: %bb.24(0x00000000), %bb.25(0x80000000)
%27:gr64 = COPY killed %166
%26:gr64 = COPY killed %165
%25:gr64 = COPY killed %164
%24:gr64 = COPY killed %163
%143:gr64 = MOV64rm %24, 1, $noreg, 904, $noreg :: (load unordered 8 from %ir.1, addrspace 1)
%144:gr64 = COPY killed %143
dead %144:gr64 = NEG64r %144, implicit-def $eflags
%145:gr64 = SETB_C64r implicit-def dead $eflags, implicit killed $eflags
EH_LABEL <mcsymbol .Ltmp21>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$rsi = COPY killed %25
%151:gr64 = COPY killed %26
%152:gr64 = COPY killed %27
%150:gr64 = COPY killed %145
%142:gr64 = COPY killed %24
dead %142:gr64, dead %150:gr64, dead %151:gr64, dead %152:gr64 = STATEPOINT 1, 16, 5, undef %153:gr64, undef $edi, killed $rsi, undef $edx, undef $ecx, undef $r8d, 2, 0, 2, 0, 2, 49, 2, 0, 2, 0, 2, 0, 2, 572, 2, 2, 2, 19, 2, 0, 2, 0, %150, 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 3, 2, 4278124286, 2, 3, %2, 2, 3, %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, %151, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %152, 2, 7, 2, 0, 2, 4, %142(tied-def 0), %150(tied-def 1), %151(tied-def 2), %152(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
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp22>
JMP_1 %bb.24
bb.24.bb111:
successors:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%160:gr32 = MOV32ri 10
$edi = COPY killed %160
STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, killed $edi, 2, 0, 2, 2, 2, 53, 2, 0, 2, 1, 2, 0, 2, 581, 2, 4, 2, 19, 2, 0, 2, 0, 2, 0, 2, 3, 2, 4278124286, 2, 4, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 3, 2, 4278124286, 2, 3, killed %2, 2, 3, killed %3, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 2, 2, 0, 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.25.bb114 (landing-pad):
successors: %bb.22(0x80000000)
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp23>
%162:gr64 = IMPLICIT_DEF
JMP_1 %bb.22
...

View File

@ -0,0 +1,402 @@
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -x mir -run-pass=simple-register-coalescing,greedy -verify-machineinstrs < %s | FileCheck %s
## Check that Inline Spiller cannot insert spill after last insertion point.
--- |
; ModuleID = 'inline-spiller'
source_filename = "inline-spiller.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define void @hoge() gc "statepoint-example" personality i32* ()* @widget {
bb:
%tmp = call token (i64, i32, void (i8 addrspace(1)*, i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidp1i8p1i8f(i64 2, i32 5, void (i8 addrspace(1)*, i8 addrspace(1)*)* nonnull @quux, i32 2, i32 0, i8 addrspace(1)* nonnull null, i8 addrspace(1)* undef, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 43, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null, i32 10, i32 1, i32 6, i32 0, i32 4, i32 1, i32 0, i8 addrspace(1)* null, i32 7, i8* null, i32 0, i8 addrspace(1)* null, i32 7, i8* null, i32 0, i8 addrspace(1)* null, i32 2, i32 4, i32 5, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* null, i8 addrspace(1)* undef) ]
br label %bb1
bb1: ; preds = %bb21, %bb
%tmp2 = phi i32 addrspace(1)* [ undef, %bb ], [ %tmp22, %bb21 ]
%tmp3 = phi i8 addrspace(1)* [ undef, %bb ], [ %tmp23, %bb21 ]
%tmp4 = phi i8 addrspace(1)* [ undef, %bb ], [ %tmp24, %bb21 ]
%tmp5 = phi i8 addrspace(1)* [ undef, %bb ], [ %tmp25, %bb21 ]
%tmp6 = phi i8 addrspace(1)* [ null, %bb ], [ %tmp26, %bb21 ]
%tmp7 = phi i32 [ 0, %bb ], [ %tmp13, %bb21 ]
%tmp8 = load atomic i32, i32 addrspace(1)* undef unordered, align 8
%tmp9 = load atomic i32, i32 addrspace(1)* %tmp2 unordered, align 4
%tmp10 = sub i32 %tmp8, %tmp9
%tmp11 = icmp slt i32 %tmp10, undef
%tmp12 = select i1 %tmp11, i32 %tmp10, i32 undef
%tmp13 = add i32 %tmp12, %tmp7
%tmp14 = call token (i64, i32, void (i8 addrspace(1)*, i32, i32, i8 addrspace(1)*, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidp1i8i32i32p1i8i32f(i64 2, i32 5, void (i8 addrspace(1)*, i32, i32, i8 addrspace(1)*, i32)* nonnull @hoge.1, i32 5, i32 0, i8 addrspace(1)* %tmp4, i32 %tmp7, i32 %tmp13, i8 addrspace(1)* undef, i32 %tmp9, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 43, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null, i32 10, i32 1, i32 10, i32 0, i32 4, i32 1, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp6, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp6, i32 10, i32 5, i32 12, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* %tmp6, i32 0, i8 addrspace(1)* %tmp6, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp6, i32 2, i32 11, i32 4, i32 0, i32 1, i32 0, i32 7, i8* null, i32 2, i32 15, i32 7, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null, i32 10, i32 21, i32 63, i32 0, i32 9, i32 1, i32 0, i8 addrspace(1)* %tmp5, i32 0, i8 addrspace(1)* %tmp4, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp3, i32 3, i32 %tmp7, i32 3, i32 undef, i32 3, i32 %tmp12, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp3), "gc-live"(i8 addrspace(1)* %tmp6, i8 addrspace(1)* %tmp5, i8 addrspace(1)* %tmp4, i8 addrspace(1)* %tmp3) ]
%tmp15 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp14, i32 0, i32 0) ; (%tmp6, %tmp6)
%tmp16 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp14, i32 1, i32 1) ; (%tmp5, %tmp5)
%tmp17 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp14, i32 2, i32 2) ; (%tmp4, %tmp4)
%tmp18 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp14, i32 3, i32 3) ; (%tmp3, %tmp3)
%tmp19 = add i32 0, %tmp12
%tmp20 = icmp slt i32 %tmp19, undef
br i1 %tmp20, label %bb21, label %bb28
bb21: ; preds = %bb30, %bb1
%tmp22 = phi i32 addrspace(1)* [ undef, %bb1 ], [ %tmp34, %bb30 ]
%tmp23 = phi i8 addrspace(1)* [ %tmp18, %bb1 ], [ undef, %bb30 ]
%tmp24 = phi i8 addrspace(1)* [ %tmp17, %bb1 ], [ undef, %bb30 ]
%tmp25 = phi i8 addrspace(1)* [ %tmp16, %bb1 ], [ %tmp32, %bb30 ]
%tmp26 = phi i8 addrspace(1)* [ %tmp15, %bb1 ], [ %tmp31, %bb30 ]
br label %bb1
bb28: ; preds = %bb1
%tmp29 = invoke token (i64, i32, void (i32, i8 addrspace(1)*, i8 addrspace(1)*, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32p1i8p1i8i32i32f(i64 1, i32 16, void (i32, i8 addrspace(1)*, i8 addrspace(1)*, i32, i32)* nonnull @ham, i32 5, i32 0, i32 undef, i8 addrspace(1)* nonnull undef, i8 addrspace(1)* undef, i32 0, i32 undef, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 43, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null, i32 10, i32 1, i32 10, i32 0, i32 4, i32 1, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp15, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp15, i32 10, i32 5, i32 12, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* %tmp15, i32 0, i8 addrspace(1)* %tmp15, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp15, i32 2, i32 11, i32 4, i32 0, i32 1, i32 0, i32 7, i8* null, i32 2, i32 15, i32 7, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null, i32 10, i32 21, i32 96, i32 0, i32 9, i32 1, i32 0, i8 addrspace(1)* %tmp16, i32 0, i8 addrspace(1)* %tmp17, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp18, i32 3, i32 %tmp13, i32 3, i32 undef, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp18, i32 8, i32 12, i32 34, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* %tmp16, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 0, i8 addrspace(1)* undef), "gc-live"(i8 addrspace(1)* %tmp15, i8 addrspace(1)* %tmp16, i8 addrspace(1)* %tmp17, i8 addrspace(1)* %tmp18, i8 addrspace(1)* undef) ]
to label %bb30 unwind label %bb35
bb30: ; preds = %bb28
%tmp31 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp29, i32 0, i32 0) ; (%tmp15, %tmp15)
%tmp32 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp29, i32 1, i32 1) ; (%tmp16, %tmp16)
%tmp33 = getelementptr inbounds i8, i8 addrspace(1)* %tmp32, i64 28
%tmp34 = bitcast i8 addrspace(1)* %tmp33 to i32 addrspace(1)*
call void @barney() #2
br label %bb21
bb35: ; preds = %bb28
%tmp36 = landingpad token
cleanup
%tmp37 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp36, i32 0, i32 0) ; (%tmp15, %tmp15)
%tmp38 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp36, i32 3, i32 3) ; (%tmp18, %tmp18)
%tmp39 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @wombat, i32 1, i32 2, i32 3, i32 0, i32 0) [ "deopt"(i32 0, i32 2, i32 0, i32 43, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null, i32 10, i32 1, i32 10, i32 0, i32 4, i32 1, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp37, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp37, i32 10, i32 5, i32 12, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* %tmp37, i32 0, i8 addrspace(1)* %tmp37, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp37, i32 2, i32 11, i32 4, i32 0, i32 1, i32 0, i32 7, i8* null, i32 2, i32 15, i32 7, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null, i32 10, i32 21, i32 96, i32 0, i32 9, i32 1, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp38, i32 3, i32 %tmp13, i32 3, i32 undef, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp38, i32 0, i32 12, i32 51, i32 0, i32 3, i32 0, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"() ]
unreachable
}
; Function Attrs: willreturn
declare i32* @widget() #0
declare void @quux(i8 addrspace(1)*, i8 addrspace(1)*)
declare void @hoge.1(i8 addrspace(1)*, i32, i32, i8 addrspace(1)*, i32)
; Function Attrs: willreturn
declare void @barney() #0
declare void @ham(i32, i8 addrspace(1)*, i8 addrspace(1)*, i32, i32)
declare void @wombat(i32)
declare token @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 immarg, i32 immarg, void (i32)*, i32 immarg, i32 immarg, ...)
; Function Attrs: nounwind readnone
declare i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token, i32 immarg, i32 immarg) #1
declare token @llvm.experimental.gc.statepoint.p0f_isVoidp1i8p1i8f(i64 immarg, i32 immarg, void (i8 addrspace(1)*, i8 addrspace(1)*)*, i32 immarg, i32 immarg, ...)
declare token @llvm.experimental.gc.statepoint.p0f_isVoidp1i8i32i32p1i8i32f(i64 immarg, i32 immarg, void (i8 addrspace(1)*, i32, i32, i8 addrspace(1)*, i32)*, i32 immarg, i32 immarg, ...)
declare token @llvm.experimental.gc.statepoint.p0f_isVoidi32p1i8p1i8i32i32f(i64 immarg, i32 immarg, void (i32, i8 addrspace(1)*, i8 addrspace(1)*, i32, i32)*, i32 immarg, i32 immarg, ...)
attributes #0 = { willreturn }
attributes #1 = { nounwind readnone }
attributes #2 = { nounwind }
...
---
name: hoge
alignment: 16
exposesReturnsTwice: false
legalized: false
regBankSelected: false
selected: false
failedISel: false
tracksRegLiveness: true
hasWinCFI: false
registers:
- { id: 0, class: gr64, preferred-register: '' }
- { id: 1, class: gr64, preferred-register: '' }
- { id: 2, class: gr64, preferred-register: '' }
- { id: 3, class: gr64, preferred-register: '' }
- { id: 4, class: gr64, preferred-register: '' }
- { id: 5, class: gr32, preferred-register: '' }
- { id: 6, class: gr32, preferred-register: '' }
- { id: 7, class: gr64, preferred-register: '' }
- { id: 8, class: gr64, preferred-register: '' }
- { id: 9, class: gr64, preferred-register: '' }
- { id: 10, class: gr64, preferred-register: '' }
- { id: 11, class: gr64, preferred-register: '' }
- { id: 12, class: gr64, preferred-register: '' }
- { id: 13, class: gr64, preferred-register: '' }
- { id: 14, class: gr64, preferred-register: '' }
- { id: 15, class: gr64, preferred-register: '' }
- { id: 16, class: gr64, preferred-register: '' }
- { id: 17, class: gr64, preferred-register: '' }
- { id: 18, class: gr64, preferred-register: '' }
- { id: 19, class: gr64, preferred-register: '' }
- { id: 20, class: gr64, preferred-register: '' }
- { id: 21, class: gr64, preferred-register: '' }
- { id: 22, class: gr32, preferred-register: '' }
- { id: 23, class: gr64, preferred-register: '' }
- { id: 24, class: gr64, preferred-register: '' }
- { id: 25, class: gr64, preferred-register: '' }
- { id: 26, class: gr64, preferred-register: '' }
- { id: 27, class: gr64, preferred-register: '' }
- { id: 28, class: gr64, preferred-register: '' }
- { id: 29, class: gr64, preferred-register: '' }
- { id: 30, class: gr32, preferred-register: '' }
- { id: 31, class: gr64, preferred-register: '' }
- { id: 32, class: gr32, preferred-register: '' }
- { id: 33, class: gr32, preferred-register: '' }
- { id: 34, class: gr64, preferred-register: '' }
- { id: 35, class: gr64, preferred-register: '' }
- { id: 36, class: gr32, preferred-register: '' }
- { id: 37, class: gr32, preferred-register: '' }
- { id: 38, class: gr64, preferred-register: '' }
- { id: 39, class: gr64, preferred-register: '' }
- { id: 40, class: gr64, preferred-register: '' }
- { id: 41, class: gr32, preferred-register: '' }
- { id: 42, class: gr32, preferred-register: '' }
- { id: 43, class: gr64, preferred-register: '' }
- { id: 44, class: gr64, preferred-register: '' }
- { id: 45, class: gr32, preferred-register: '' }
- { id: 46, class: gr64, preferred-register: '' }
- { id: 47, class: gr64, preferred-register: '' }
- { id: 48, class: gr64, preferred-register: '' }
- { id: 49, class: gr64, preferred-register: '' }
- { id: 50, class: gr32, preferred-register: '' }
- { id: 51, class: gr64, preferred-register: '' }
- { id: 52, class: gr64, preferred-register: '' }
- { id: 53, class: gr64, preferred-register: '' }
- { id: 54, class: gr64, preferred-register: '' }
- { id: 55, class: gr64, preferred-register: '' }
- { id: 56, class: gr64, preferred-register: '' }
- { id: 57, class: gr64, preferred-register: '' }
- { id: 58, class: gr64, preferred-register: '' }
- { id: 59, class: gr32, preferred-register: '' }
- { id: 60, class: gr64, preferred-register: '' }
- { id: 61, class: gr64, preferred-register: '' }
- { id: 62, class: gr64, preferred-register: '' }
- { id: 63, class: gr64, preferred-register: '' }
- { id: 64, class: gr64, preferred-register: '' }
- { id: 65, class: gr64, preferred-register: '' }
- { id: 66, class: gr64_nosp, preferred-register: '' }
liveins: []
frameInfo:
isFrameAddressTaken: false
isReturnAddressTaken: false
hasStackMap: false
hasPatchPoint: false
stackSize: 0
offsetAdjustment: 0
maxAlignment: 4
adjustsStack: false
hasCalls: true
stackProtector: ''
maxCallFrameSize: 4294967295
cvBytesOfCalleeSavedRegisters: 0
hasOpaqueSPAdjustment: false
hasVAStart: false
hasMustTailInVarArgFunc: false
hasTailCall: false
localFrameSize: 0
savePoint: ''
restorePoint: ''
fixedStack: []
stack:
- { id: 0, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
- { id: 1, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
callSites: []
debugValueSubstitutions: []
constants: []
machineFunctionInfo: {}
body: |
; CHECK-LABEL: name: hoge
; CHECK: bb.0.bb:
; CHECK: successors: %bb.1(0x80000000)
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: undef %75.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
; CHECK: MOV64mr %stack.2, 1, $noreg, 0, $noreg, %75 :: (store 8 into %stack.2)
; CHECK: dead $edi = MOV32r0 implicit-def dead $eflags, implicit-def $rdi
; CHECK: STATEPOINT 2, 5, 2, undef %24:gr64, $rdi, undef $rsi, 2, 0, 2, 0, 2, 37, 2, 0, 2, 2, 2, 0, 2, 43, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 6, 2, 0, 2, 4, 2, 1, 2, 0, 2, 0, 2, 7, 2, 0, 2, 0, 2, 0, 2, 7, 2, 0, 2, 0, 2, 0, 2, 2, 2, 4, 2, 5, 2, 0, 2, 2, 2, 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
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: [[DEF1:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: [[DEF2:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: [[DEF3:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
; CHECK: bb.1.bb1:
; CHECK: successors: %bb.2(0x40000000), %bb.4(0x40000000)
; CHECK: undef %66.sub_32bit:gr64_nosp = COPY [[MOV32r0_]]
; CHECK: undef %65.sub_32bit:gr64_with_sub_8bit = MOV32rm undef %31:gr64, 1, $noreg, 0, $noreg :: (load unordered 4 from `i32 addrspace(1)* undef`, align 8, addrspace 1)
; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[DEF]], 1, $noreg, 0, $noreg :: (load unordered 4 from %ir.tmp2, addrspace 1)
; CHECK: %65.sub_32bit:gr64_with_sub_8bit = SUB32rr %65.sub_32bit, [[MOV32rm]], implicit-def dead $eflags
; CHECK: [[LEA64_32r:%[0-9]+]]:gr32 = LEA64_32r %65, 1, %66, 0, $noreg
; CHECK: MOV32mr %stack.0, 1, $noreg, 0, $noreg, %66.sub_32bit :: (store 4 into %stack.0)
; CHECK: MOV32mr %stack.1, 1, $noreg, 0, $noreg, %65.sub_32bit :: (store 4 into %stack.1)
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $rdi = COPY [[DEF2]]
; CHECK: $esi = COPY %66.sub_32bit
; CHECK: $edx = COPY [[LEA64_32r]]
; CHECK: $r8d = COPY [[MOV32rm]]
; CHECK: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm %stack.2, 1, $noreg, 0, $noreg :: (load 8 from %stack.2)
; CHECK: [[COPY:%[0-9]+]]:gr64 = COPY [[MOV64rm]]
; CHECK: [[STATEPOINT:%[0-9]+]]:gr64, [[STATEPOINT1:%[0-9]+]]:gr64, [[STATEPOINT2:%[0-9]+]]:gr64, [[STATEPOINT3:%[0-9]+]]:gr64 = STATEPOINT 2, 5, 5, undef %35:gr64, $rdi, $esi, $edx, undef $rcx, $r8d, 2, 0, 2, 0, 2, 85, 2, 0, 2, 2, 2, 0, 2, 43, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT3]], 2, 7, 2, 0, 2, 0, [[STATEPOINT3]], 2, 10, 2, 5, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, [[STATEPOINT3]], 2, 0, [[STATEPOINT3]], 2, 7, 2, 0, 2, 0, [[STATEPOINT3]], 2, 2, 2, 11, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 15, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 21, 2, 63, 2, 0, 2, 9, 2, 1, 2, 0, [[STATEPOINT2]], 2, 0, [[STATEPOINT1]], 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 3, 1, 4, %stack.0, 0, 2, 3, 2, 4278124286, 2, 3, 1, 4, %stack.1, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 4, [[STATEPOINT]](tied-def 0), [[STATEPOINT1]](tied-def 1), [[STATEPOINT2]](tied-def 2), [[STATEPOINT3]](tied-def 3), 2, 0, 2, 4, 0, 0, 1, 1, 2, 2, 3, 3, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store 4 on %stack.0), (volatile load store 4 on %stack.1)
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: CMP32rr %65.sub_32bit, undef %37:gr32, implicit-def $eflags
; CHECK: JCC_1 %bb.4, 13, implicit killed $eflags
; CHECK: bb.2:
; CHECK: successors: %bb.3(0x80000000)
; CHECK: [[COPY:%[0-9]+]]:gr64 = COPY [[STATEPOINT3]]
; CHECK: MOV64mr %stack.2, 1, $noreg, 0, $noreg, [[COPY]] :: (store 8 into %stack.2)
; CHECK: [[DEF1:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: [[COPY1:%[0-9]+]]:gr32 = COPY [[LEA64_32r]]
; CHECK: bb.3.bb21:
; CHECK: successors: %bb.1(0x80000000)
; CHECK: JMP_1 %bb.1
; CHECK: bb.4.bb28:
; CHECK: successors: %bb.5(0x80000000), %bb.6(0x00000000)
; CHECK: MOV32mr %stack.0, 1, $noreg, 0, $noreg, [[LEA64_32r]] :: (store 4 into %stack.0)
; CHECK: EH_LABEL <mcsymbol .Ltmp0>
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $ecx = MOV32r0 implicit-def dead $eflags
; CHECK: [[COPY4:%[0-9]+]]:gr32 = COPY [[LEA64_32r]]
; CHECK: [[STATEPOINT2]]:gr64, [[STATEPOINT3]]:gr64, [[STATEPOINT]]:gr64, dead [[STATEPOINT1]]:gr64 = STATEPOINT 1, 16, 5, undef %47:gr64, undef $edi, undef $rsi, undef $rdx, $ecx, undef $r8d, 2, 0, 2, 0, 2, 99, 2, 0, 2, 2, 2, 0, 2, 43, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT3]], 2, 7, 2, 0, 2, 0, [[STATEPOINT3]], 2, 10, 2, 5, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, [[STATEPOINT3]], 2, 0, [[STATEPOINT3]], 2, 7, 2, 0, 2, 0, [[STATEPOINT3]], 2, 2, 2, 11, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 15, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 21, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, [[STATEPOINT2]], 2, 0, [[STATEPOINT1]], 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 3, 1, 4, %stack.0, 0, 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 8, 2, 12, 2, 34, 2, 0, 2, 3, 2, 1, 2, 0, [[STATEPOINT2]], 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 5, [[STATEPOINT2]](tied-def 0), [[STATEPOINT3]](tied-def 1), [[STATEPOINT]](tied-def 2), [[STATEPOINT1]](tied-def 3), 2, 4278124286, 2, 0, 2, 5, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store 4 on %stack.0)
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: EH_LABEL <mcsymbol .Ltmp1>
; CHECK: JMP_1 %bb.5
; CHECK: bb.5.bb30:
; CHECK: successors: %bb.3(0x80000000)
; CHECK: [[COPY2:%[0-9]+]]:gr64 = COPY [[STATEPOINT3]]
; CHECK: MOV64mr %stack.2, 1, $noreg, 0, $noreg, [[COPY2]] :: (store 8 into %stack.2)
; CHECK: [[COPY3:%[0-9]+]]:gr64 = COPY [[STATEPOINT2]]
; CHECK: [[ADD64ri8_:%[0-9]+]]:gr64 = nuw ADD64ri8 [[ADD64ri8_]], 28, implicit-def dead $eflags
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: CALL64pcrel32 target-flags(x86-plt) @barney, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
; CHECK: [[COPY3:%[0-9]+]]:gr64 = COPY [[ADD64ri8_]]
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: [[DEF1:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: JMP_1 %bb.3
; CHECK: bb.6.bb35 (landing-pad):
; CHECK: liveins: $rax, $rdx
; CHECK: EH_LABEL <mcsymbol .Ltmp2>
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $edi = MOV32ri 3
; CHECK: dead [[STATEPOINT3]]:gr64, dead [[DEF]]:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @wombat, $edi, 2, 0, 2, 2, 2, 97, 2, 0, 2, 2, 2, 0, 2, 43, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT3]], 2, 7, 2, 0, 2, 0, [[STATEPOINT3]], 2, 10, 2, 5, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, [[STATEPOINT3]], 2, 0, [[STATEPOINT3]], 2, 7, 2, 0, 2, 0, [[STATEPOINT3]], 2, 2, 2, 11, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 15, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 21, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF]], 2, 3, [[COPY4]], 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF]], 2, 0, 2, 12, 2, 51, 2, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 3, [[STATEPOINT3]](tied-def 0), 2, 4278124286, [[DEF]](tied-def 1), 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.0.bb:
successors: %bb.1(0x80000000)
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%22:gr32 = MOV32r0 implicit-def dead $eflags
%21:gr64 = SUBREG_TO_REG 0, %22, %subreg.sub_32bit
$rdi = COPY %21
STATEPOINT 2, 5, 2, undef %24:gr64, killed $rdi, undef $rsi, 2, 0, 2, 0, 2, 37, 2, 0, 2, 2, 2, 0, 2, 43, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 6, 2, 0, 2, 4, 2, 1, 2, 0, 2, 0, 2, 7, 2, 0, 2, 0, 2, 0, 2, 7, 2, 0, 2, 0, 2, 0, 2, 2, 2, 4, 2, 5, 2, 0, 2, 2, 2, 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
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%54:gr64 = IMPLICIT_DEF
%55:gr64 = IMPLICIT_DEF
%56:gr64 = IMPLICIT_DEF
%57:gr64 = IMPLICIT_DEF
%58:gr64 = COPY killed %21
%59:gr32 = COPY %22
bb.1.bb1:
successors: %bb.6(0x40000000), %bb.3(0x40000000)
%5:gr32 = COPY killed %59
%4:gr64 = COPY killed %58
%3:gr64 = COPY killed %57
%2:gr64 = COPY killed %56
%1:gr64 = COPY killed %55
%0:gr64 = COPY killed %54
%30:gr32 = MOV32rm undef %31:gr64, 1, $noreg, 0, $noreg :: (load unordered 4 from `i32 addrspace(1)* undef`, align 8, addrspace 1)
%32:gr32 = MOV32rm killed %0, 1, $noreg, 0, $noreg :: (load unordered 4 from %ir.tmp2, addrspace 1)
%33:gr32 = COPY killed %30
%33:gr32 = SUB32rr %33, %32, implicit-def dead $eflags
undef %65.sub_32bit:gr64 = COPY %33
undef %66.sub_32bit:gr64_nosp = COPY %5
%6:gr32 = LEA64_32r killed %65, 1, killed %66, 0, $noreg
MOV32mr %stack.0, 1, $noreg, 0, $noreg, %5 :: (store 4 into %stack.0)
MOV32mr %stack.1, 1, $noreg, 0, $noreg, %33 :: (store 4 into %stack.1)
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$rdi = COPY %2
$esi = COPY killed %5
$edx = COPY %6
$r8d = COPY killed %32
%26:gr64 = COPY killed %2
%28:gr64 = COPY killed %4
%25:gr64 = COPY killed %1
%27:gr64 = COPY killed %3
%25:gr64, %26:gr64, %27:gr64, %28:gr64 = STATEPOINT 2, 5, 5, undef %35:gr64, killed $rdi, killed $esi, killed $edx, undef $rcx, killed $r8d, 2, 0, 2, 0, 2, 85, 2, 0, 2, 2, 2, 0, 2, 43, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %28, 2, 7, 2, 0, 2, 0, %28, 2, 10, 2, 5, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, %28, 2, 0, %28, 2, 7, 2, 0, 2, 0, %28, 2, 2, 2, 11, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 15, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 21, 2, 63, 2, 0, 2, 9, 2, 1, 2, 0, %27, 2, 0, %26, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %25, 2, 3, 1, 4, %stack.0, 0, 2, 3, 2, 4278124286, 2, 3, 1, 4, %stack.1, 0, 2, 7, 2, 0, 2, 0, %25, 2, 4, %25(tied-def 0), %26(tied-def 1), %27(tied-def 2), %28(tied-def 3), 2, 0, 2, 4, 0, 0, 1, 1, 2, 2, 3, 3, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store 4 on %stack.0), (volatile load store 4 on %stack.1)
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
CMP32rr killed %33, undef %37:gr32, implicit-def $eflags
JCC_1 %bb.3, 13, implicit killed $eflags
bb.6:
successors: %bb.2(0x80000000)
%60:gr64 = IMPLICIT_DEF
%61:gr64 = COPY killed %25
%62:gr64 = COPY killed %26
%63:gr64 = COPY killed %27
%64:gr64 = COPY killed %28
bb.2.bb21:
successors: %bb.1(0x80000000)
%15:gr64 = COPY killed %64
%14:gr64 = COPY killed %63
%13:gr64 = COPY killed %62
%12:gr64 = COPY killed %61
%11:gr64 = COPY killed %60
%54:gr64 = COPY killed %11
%55:gr64 = COPY killed %12
%56:gr64 = COPY killed %13
%57:gr64 = COPY killed %14
%58:gr64 = COPY killed %15
%59:gr32 = COPY killed %6
JMP_1 %bb.1
bb.3.bb28:
successors: %bb.4(0x80000000), %bb.5(0x00000000)
MOV32mr %stack.0, 1, $noreg, 0, $noreg, %6 :: (store 4 into %stack.0)
EH_LABEL <mcsymbol .Ltmp0>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$ecx = COPY %22
%46:gr64 = COPY killed %26
%39:gr64 = COPY killed %28
%40:gr64 = COPY killed %25
%38:gr64 = COPY killed %27
%38:gr64, %39:gr64, %40:gr64, dead %46:gr64 = STATEPOINT 1, 16, 5, undef %47:gr64, undef $edi, undef $rsi, undef $rdx, killed $ecx, undef $r8d, 2, 0, 2, 0, 2, 99, 2, 0, 2, 2, 2, 0, 2, 43, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %39, 2, 7, 2, 0, 2, 0, %39, 2, 10, 2, 5, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, %39, 2, 0, %39, 2, 7, 2, 0, 2, 0, %39, 2, 2, 2, 11, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 15, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 21, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, %38, 2, 0, %46, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %40, 2, 3, 1, 4, %stack.0, 0, 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %40, 2, 8, 2, 12, 2, 34, 2, 0, 2, 3, 2, 1, 2, 0, %38, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 5, %38(tied-def 0), %39(tied-def 1), %40(tied-def 2), %46(tied-def 3), 2, 4278124286, 2, 0, 2, 5, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store 4 on %stack.0)
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp1>
JMP_1 %bb.4
bb.4.bb30:
successors: %bb.2(0x80000000)
%16:gr64 = COPY killed %39
%17:gr64 = COPY %38
%18:gr64 = COPY killed %38
%18:gr64 = nuw ADD64ri8 %18, 28, implicit-def dead $eflags
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
CALL64pcrel32 target-flags(x86-plt) @barney, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%60:gr64 = COPY killed %18
%61:gr64 = IMPLICIT_DEF
%62:gr64 = IMPLICIT_DEF
%63:gr64 = COPY killed %17
%64:gr64 = COPY killed %16
JMP_1 %bb.2
bb.5.bb35 (landing-pad):
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp2>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%50:gr32 = MOV32ri 3
$edi = COPY killed %50
%52:gr64 = COPY killed %40
%51:gr64 = COPY killed %39
dead %51:gr64, dead %52:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @wombat, killed $edi, 2, 0, 2, 2, 2, 97, 2, 0, 2, 2, 2, 0, 2, 43, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 1, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %51, 2, 7, 2, 0, 2, 0, %51, 2, 10, 2, 5, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, %51, 2, 0, %51, 2, 7, 2, 0, 2, 0, %51, 2, 2, 2, 11, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 15, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 21, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %52, 2, 3, killed %6, 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %52, 2, 0, 2, 12, 2, 51, 2, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 3, %51(tied-def 0), 2, 4278124286, %52(tied-def 1), 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
...

View File

@ -0,0 +1,604 @@
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# REQUIRES: asserts
# RUN: llc -x mir -run-pass=greedy -verify-machineinstrs < %s 2>&1 | FileCheck %s
# CHECK-NOT: Cannot move stop beyond start
--- |
; ModuleID = 'remove-back-copies'
source_filename = "remove-back-copies.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define void @hoge(i8 addrspace(1)* %arg) gc "statepoint-example" personality i32* ()* @widget {
bb:
%tmp = call token (i64, i32, void (i8 addrspace(1)*, i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidp1i8p1i8f(i64 2, i32 5, void (i8 addrspace(1)*, i8 addrspace(1)*)* nonnull @quux, i32 2, i32 0, i8 addrspace(1)* %arg, i8 addrspace(1)* undef, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 6, i32 0, i32 4, i32 1, i32 0, i8 addrspace(1)* %arg, i32 7, i8* null, i32 0, i8 addrspace(1)* %arg, i32 7, i8* null, i32 0, i8 addrspace(1)* %arg, i32 2, i32 1, i32 5, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null), "gc-live"(i8 addrspace(1)* %arg) ]
%tmp1 = load atomic i8 addrspace(1)*, i8 addrspace(1)* addrspace(1)* undef unordered, align 8
%tmp2 = ptrtoint i8 addrspace(1)* %tmp1 to i64
%tmp3 = xor i64 %tmp2, -1
%tmp4 = inttoptr i64 %tmp3 to i8 addrspace(1)*
%tmp5 = select i1 false, i8 addrspace(1)* null, i8 addrspace(1)* %tmp4
br i1 undef, label %bb6, label %bb40
bb6: ; preds = %bb
br label %bb7
bb7: ; preds = %bb27, %bb6
%tmp9 = phi i8 addrspace(1)* [ undef, %bb6 ], [ %tmp28, %bb27 ]
%tmp10 = phi i8 addrspace(1)* [ undef, %bb6 ], [ %tmp29, %bb27 ]
%tmp11 = phi i8 addrspace(1)* [ undef, %bb6 ], [ %tmp30, %bb27 ]
%tmp12 = phi i32 [ 0, %bb6 ], [ %tmp16, %bb27 ]
%tmp13 = load atomic i32, i32 addrspace(1)* undef unordered, align 8
%tmp14 = sub i32 %tmp13, 0
%tmp15 = select i1 false, i32 %tmp14, i32 undef
%tmp16 = add i32 %tmp15, %tmp12
%tmp17 = icmp sgt i32 %tmp12, %tmp16
%tmp18 = or i1 undef, %tmp17
%tmp19 = or i1 undef, %tmp18
br i1 %tmp19, label %bb41, label %bb20
bb20: ; preds = %bb7
br i1 undef, label %bb27, label %bb23
bb23: ; preds = %bb20
%tmp24 = invoke token (i64, i32, void (i32, i8 addrspace(1)*, i8 addrspace(1)*, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32p1i8p1i8i32i32f(i64 1, i32 16, void (i32, i8 addrspace(1)*, i8 addrspace(1)*, i32, i32)* nonnull @barney, i32 5, i32 0, i32 undef, i8 addrspace(1)* nonnull undef, i8 addrspace(1)* null, i32 0, i32 undef, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp11, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp11, i32 10, i32 2, i32 12, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* %tmp11, i32 0, i8 addrspace(1)* %tmp11, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp11, i32 2, i32 8, i32 4, i32 0, i32 1, i32 0, i32 7, i8* null, i32 2, i32 12, i32 7, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null, i32 10, i32 18, i32 96, i32 0, i32 9, i32 1, i32 0, i8 addrspace(1)* %tmp10, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp9, i32 3, i32 %tmp16, i32 3, i32 0, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp9, i32 8, i32 9, i32 34, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* %tmp10, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 0, i8 addrspace(1)* undef), "gc-live"(i8 addrspace(1)* %tmp11, i8 addrspace(1)* %tmp9, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp10, i8 addrspace(1)* undef, i8 addrspace(1)* %tmp5) ]
to label %bb25 unwind label %bb35
bb25: ; preds = %bb23
%tmp26 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp24, i32 5, i32 5) ; (%tmp5, %tmp5)
br label %bb27
bb27: ; preds = %bb25, %bb20
%tmp28 = phi i8 addrspace(1)* [ %tmp9, %bb20 ], [ undef, %bb25 ]
%tmp29 = phi i8 addrspace(1)* [ %tmp10, %bb20 ], [ undef, %bb25 ]
%tmp30 = phi i8 addrspace(1)* [ %tmp11, %bb20 ], [ null, %bb25 ]
%tmp34 = icmp sgt i32 0, %tmp16
br i1 %tmp34, label %bb7, label %bb44
bb35: ; preds = %bb23
%tmp36 = landingpad token
cleanup
br i1 undef, label %bb39, label %bb37
bb37: ; preds = %bb35
%tmp38 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @ham, i32 1, i32 2, i32 3, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 10, i32 2, i32 12, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 2, i32 8, i32 4, i32 0, i32 1, i32 0, i32 7, i8* null, i32 2, i32 12, i32 7, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null, i32 10, i32 18, i32 96, i32 0, i32 9, i32 1, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 3, i32 %tmp16, i32 3, i32 0, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 0, i32 9, i32 51, i32 0, i32 3, i32 0, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"() ]
unreachable
bb39: ; preds = %bb35
unreachable
bb40: ; preds = %bb
call void @wombat()
br label %bb41
bb41: ; preds = %bb7, %bb40
%tmp42 = phi i32 [ 0, %bb40 ], [ %tmp12, %bb7 ]
%tmp43 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @ham, i32 1, i32 2, i32 -39, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 10, i32 2, i32 12, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 2, i32 8, i32 4, i32 0, i32 1, i32 0, i32 7, i8* null, i32 2, i32 12, i32 7, i32 0, i32 2, i32 0, i32 7, i8* null, i32 7, i8* null, i32 10, i32 18, i32 63, i32 0, i32 9, i32 1, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 3, i32 %tmp42, i32 3, i32 0, i32 3, i32 undef, i32 7, i8* null, i32 0, i8 addrspace(1)* undef, i32 2, i32 33, i32 6, i32 0, i32 5, i32 0, i32 0, i8 addrspace(1)* undef, i32 3, i32 %tmp42, i32 3, i32 undef, i32 0, i8 addrspace(1)* undef, i32 3, i32 undef, i32 1, i32 34, i32 14, i32 0, i32 3, i32 0, i32 3, i32 %tmp42, i32 3, i32 undef, i32 3, i32 0), "gc-live"() ]
unreachable
bb44: ; preds = %bb27
call void @hoge.1()
br i1 undef, label %bb50, label %bb45
bb45: ; preds = %bb44
br i1 undef, label %bb56, label %bb46
bb46: ; preds = %bb45
%tmp47 = invoke token (i64, i32, void (i32, i8 addrspace(1)*, i8 addrspace(1)*, i32, i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32p1i8p1i8i32i32f(i64 1, i32 16, void (i32, i8 addrspace(1)*, i8 addrspace(1)*, i32, i32)* nonnull @barney, i32 5, i32 0, i32 undef, i8 addrspace(1)* nonnull undef, i8 addrspace(1)* undef, i32 0, i32 undef, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp30, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp30, i32 10, i32 2, i32 19, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* %tmp30, i32 0, i8 addrspace(1)* %tmp30, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp30, i32 8, i32 9, i32 34, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* undef, i32 7, i8* null, i32 0, i8 addrspace(1)* undef), "gc-live"(i8 addrspace(1)* %tmp30, i8 addrspace(1)* undef, i8 addrspace(1)* undef) ]
to label %bb48 unwind label %bb52
bb48: ; preds = %bb46
%tmp49 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp47, i32 0, i32 0) ; (%tmp30, %tmp30)
br label %bb56
bb50: ; preds = %bb44
%tmp51 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @ham, i32 1, i32 2, i32 10, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp30, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp30, i32 10, i32 2, i32 19, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* %tmp30, i32 0, i8 addrspace(1)* %tmp30, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp30, i32 1, i32 9, i32 6, i32 1, i32 3, i32 0, i32 0, i8 addrspace(1)* null, i32 0, i8 addrspace(1)* undef, i32 0, i8 addrspace(1)* null, i32 7, i8* null), "gc-live"() ]
unreachable
bb52: ; preds = %bb46
%tmp53 = landingpad token
cleanup
%tmp54 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %tmp53, i32 0, i32 0) ; (%tmp30, %tmp30)
%tmp55 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @ham, i32 1, i32 2, i32 3, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp54, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp54, i32 10, i32 2, i32 19, i32 0, i32 3, i32 1, i32 0, i8 addrspace(1)* %tmp54, i32 0, i8 addrspace(1)* %tmp54, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp54, i32 0, i32 9, i32 51, i32 0, i32 3, i32 0, i32 7, i8* null, i32 7, i8* null, i32 7, i8* null), "gc-live"() ]
unreachable
bb56: ; preds = %bb48, %bb45
%tmp57 = phi i8 addrspace(1)* [ %tmp30, %bb45 ], [ %tmp49, %bb48 ]
%tmp58 = call token (i64, i32, void (i32)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 2882400000, i32 0, void (i32)* nonnull @ham, i32 1, i32 2, i32 10, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, i8* null, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp57, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp57, i32 9, i32 2, i32 26, i32 1, i32 3, i32 1, i32 0, i8 addrspace(1)* null, i32 0, i8 addrspace(1)* %tmp57, i32 0, i8 addrspace(1)* %tmp57, i32 7, i8* null, i32 0, i8 addrspace(1)* %tmp57), "gc-live"() ]
unreachable
}
declare i32* @widget()
declare void @quux(i8 addrspace(1)*, i8 addrspace(1)*)
declare void @hoge.1()
declare void @barney(i32, i8 addrspace(1)*, i8 addrspace(1)*, i32, i32)
; Function Attrs: nounwind readnone
declare i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token, i32 immarg, i32 immarg) #0
declare token @llvm.experimental.gc.statepoint.p0f_isVoidp1i8p1i8f(i64 immarg, i32 immarg, void (i8 addrspace(1)*, i8 addrspace(1)*)*, i32 immarg, i32 immarg, ...)
declare void @ham(i32)
declare token @llvm.experimental.gc.statepoint.p0f_isVoidi32f(i64 immarg, i32 immarg, void (i32)*, i32 immarg, i32 immarg, ...)
declare token @llvm.experimental.gc.statepoint.p0f_isVoidi32p1i8p1i8i32i32f(i64 immarg, i32 immarg, void (i32, i8 addrspace(1)*, i8 addrspace(1)*, i32, i32)*, i32 immarg, i32 immarg, ...)
declare void @wombat()
attributes #0 = { nounwind readnone }
...
---
name: hoge
alignment: 16
exposesReturnsTwice: false
legalized: false
regBankSelected: false
selected: false
failedISel: false
tracksRegLiveness: true
hasWinCFI: false
registers:
- { id: 0, class: gr64, preferred-register: '' }
- { id: 1, class: gr64, preferred-register: '' }
- { id: 2, class: gr64, preferred-register: '' }
- { id: 3, class: gr64_with_sub_8bit, preferred-register: '' }
- { id: 4, class: gr32, preferred-register: '' }
- { id: 5, class: gr32, preferred-register: '' }
- { id: 6, class: gr64, preferred-register: '' }
- { id: 7, class: gr64, preferred-register: '' }
- { id: 8, class: gr64, preferred-register: '' }
- { id: 9, class: gr32, preferred-register: '' }
- { id: 10, class: gr64, preferred-register: '' }
- { id: 11, class: gr64, preferred-register: '' }
- { id: 12, class: gr64, preferred-register: '' }
- { id: 13, class: gr64, preferred-register: '' }
- { id: 14, class: gr64, preferred-register: '' }
- { id: 15, class: gr64, preferred-register: '' }
- { id: 16, class: gr64, preferred-register: '' }
- { id: 17, class: gr64, preferred-register: '' }
- { id: 18, class: gr32, preferred-register: '' }
- { id: 19, class: gr8, preferred-register: '' }
- { id: 20, class: gr32, preferred-register: '' }
- { id: 21, class: gr64, preferred-register: '' }
- { id: 22, class: gr32, preferred-register: '' }
- { id: 23, class: gr32, preferred-register: '' }
- { id: 24, class: gr64, preferred-register: '' }
- { id: 25, class: gr32, preferred-register: '' }
- { id: 26, class: gr8, preferred-register: '' }
- { id: 27, class: gr32, preferred-register: '' }
- { id: 28, class: gr8, preferred-register: '' }
- { id: 29, class: gr32, preferred-register: '' }
- { id: 30, class: gr32, preferred-register: '' }
- { id: 31, class: gr8, preferred-register: '' }
- { id: 32, class: gr64, preferred-register: '' }
- { id: 33, class: gr32, preferred-register: '' }
- { id: 34, class: gr64_with_sub_8bit, preferred-register: '' }
- { id: 35, class: gr32, preferred-register: '' }
- { id: 36, class: gr64, preferred-register: '' }
- { id: 37, class: gr32, preferred-register: '' }
- { id: 38, class: gr64, preferred-register: '' }
- { id: 39, class: gr64, preferred-register: '' }
- { id: 40, class: gr64, preferred-register: '' }
- { id: 41, class: gr64, preferred-register: '' }
- { id: 42, class: gr64, preferred-register: '' }
- { id: 43, class: gr64, preferred-register: '' }
- { id: 44, class: gr32, preferred-register: '' }
- { id: 45, class: gr8, preferred-register: '' }
- { id: 46, class: gr32, preferred-register: '' }
- { id: 47, class: gr64, preferred-register: '' }
- { id: 48, class: gr64_with_sub_8bit, preferred-register: '' }
- { id: 49, class: gr32, preferred-register: '' }
- { id: 50, class: gr32, preferred-register: '' }
- { id: 51, class: gr8, preferred-register: '' }
- { id: 52, class: gr32, preferred-register: '' }
- { id: 53, class: gr8, preferred-register: '' }
- { id: 54, class: gr64, preferred-register: '' }
- { id: 55, class: gr32, preferred-register: '' }
- { id: 56, class: gr32, preferred-register: '' }
- { id: 57, class: gr64, preferred-register: '' }
- { id: 58, class: gr64, preferred-register: '' }
- { id: 59, class: gr32, preferred-register: '' }
- { id: 60, class: gr64, preferred-register: '' }
- { id: 61, class: gr64, preferred-register: '' }
- { id: 62, class: gr64, preferred-register: '' }
- { id: 63, class: gr32, preferred-register: '' }
- { id: 64, class: gr64, preferred-register: '' }
- { id: 65, class: gr32, preferred-register: '' }
- { id: 66, class: gr64, preferred-register: '' }
- { id: 67, class: gr32, preferred-register: '' }
- { id: 68, class: gr64, preferred-register: '' }
- { id: 69, class: gr32, preferred-register: '' }
- { id: 70, class: gr64, preferred-register: '' }
- { id: 71, class: gr64, preferred-register: '' }
- { id: 72, class: gr64, preferred-register: '' }
- { id: 73, class: gr32, preferred-register: '' }
- { id: 74, class: gr64, preferred-register: '' }
- { id: 75, class: gr64, preferred-register: '' }
- { id: 76, class: gr64, preferred-register: '' }
- { id: 77, class: gr32, preferred-register: '' }
- { id: 78, class: gr64, preferred-register: '' }
- { id: 79, class: gr32, preferred-register: '' }
liveins:
- { reg: '$rdi', virtual-reg: '%12' }
frameInfo:
isFrameAddressTaken: false
isReturnAddressTaken: false
hasStackMap: false
hasPatchPoint: false
stackSize: 0
offsetAdjustment: 0
maxAlignment: 4
adjustsStack: false
hasCalls: true
stackProtector: ''
maxCallFrameSize: 4294967295
cvBytesOfCalleeSavedRegisters: 0
hasOpaqueSPAdjustment: false
hasVAStart: false
hasMustTailInVarArgFunc: false
hasTailCall: false
localFrameSize: 0
savePoint: ''
restorePoint: ''
fixedStack: []
stack:
- { id: 0, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
callSites: []
debugValueSubstitutions: []
constants: []
machineFunctionInfo: {}
body: |
; CHECK-LABEL: name: hoge
; CHECK: bb.0.bb:
; CHECK: successors: %bb.1(0x80000000), %bb.15(0x00000000)
; CHECK: liveins: $rdi
; CHECK: [[COPY:%[0-9]+]]:gr64 = COPY $rdi
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $rdi = COPY [[COPY]]
; CHECK: dead [[COPY]]:gr64 = STATEPOINT 2, 5, 2, undef %15:gr64, $rdi, undef $rsi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 10, 2, 0, 2, 6, 2, 0, 2, 4, 2, 1, 2, 0, [[COPY]], 2, 7, 2, 0, 2, 0, [[COPY]], 2, 7, 2, 0, 2, 0, [[COPY]], 2, 2, 2, 1, 2, 5, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, [[COPY]](tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
; CHECK: TEST8rr [[MOV32r0_]].sub_8bit, [[MOV32r0_]].sub_8bit, implicit-def $eflags
; CHECK: JCC_1 %bb.15, 5, implicit $eflags
; CHECK: JMP_1 %bb.1
; CHECK: bb.1.bb6:
; CHECK: successors: %bb.2(0x80000000)
; CHECK: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm undef %17:gr64, 1, $noreg, 0, $noreg :: (load unordered 8 from `i8 addrspace(1)* addrspace(1)* undef`, addrspace 1)
; CHECK: [[NOT64r:%[0-9]+]]:gr64 = NOT64r [[NOT64r]]
; CHECK: MOV64mr %stack.1, 1, $noreg, 0, $noreg, [[NOT64r]] :: (store 8 into %stack.1)
; CHECK: undef %48.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
; CHECK: [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: [[DEF1:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: [[DEF2:%[0-9]+]]:gr64_with_sub_8bit = IMPLICIT_DEF
; CHECK: [[MOV32r0_1:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
; CHECK: bb.2.bb7:
; CHECK: successors: %bb.3(0x00000000), %bb.4(0x80000000)
; CHECK: TEST8rr %48.sub_8bit, %48.sub_8bit, implicit-def $eflags
; CHECK: JCC_1 %bb.4, 4, implicit $eflags
; CHECK: bb.3:
; CHECK: successors: %bb.16(0x80000000)
; CHECK: JMP_1 %bb.16
; CHECK: bb.4.bb7:
; CHECK: successors: %bb.5(0x00000000), %bb.6(0x80000000)
; CHECK: TEST8rr %48.sub_8bit, %48.sub_8bit, implicit-def $eflags
; CHECK: JCC_1 %bb.6, 4, implicit $eflags
; CHECK: bb.5:
; CHECK: successors: %bb.16(0x80000000)
; CHECK: JMP_1 %bb.16
; CHECK: bb.6.bb7:
; CHECK: successors: %bb.16(0x00000000), %bb.7(0x80000000)
; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm undef %24:gr64, 1, $noreg, 0, $noreg :: (load unordered 4 from `i32 addrspace(1)* undef`, align 8, addrspace 1)
; CHECK: [[ADD32rr:%[0-9]+]]:gr32 = ADD32rr [[ADD32rr]], [[MOV32r0_1]], implicit-def dead $eflags
; CHECK: CMP32rr [[MOV32r0_1]], [[ADD32rr]], implicit-def $eflags
; CHECK: JCC_1 %bb.16, 15, implicit $eflags
; CHECK: JMP_1 %bb.7
; CHECK: bb.7.bb20:
; CHECK: successors: %bb.8(0x40000000), %bb.9(0x40000000)
; CHECK: TEST8rr %48.sub_8bit, %48.sub_8bit, implicit-def $eflags
; CHECK: JCC_1 %bb.9, 4, implicit $eflags
; CHECK: bb.8:
; CHECK: successors: %bb.11(0x80000000)
; CHECK: JMP_1 %bb.11
; CHECK: bb.9.bb23:
; CHECK: successors: %bb.10(0x7ffff800), %bb.12(0x00000800)
; CHECK: MOV32mr %stack.0, 1, $noreg, 0, $noreg, [[ADD32rr]] :: (store 4 into %stack.0)
; CHECK: EH_LABEL <mcsymbol .Ltmp0>
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm %stack.1, 1, $noreg, 0, $noreg :: (load 8 from %stack.1)
; CHECK: dead $edx = MOV32r0 implicit-def dead $eflags, implicit-def $rdx
; CHECK: $ecx = MOV32r0 implicit-def dead $eflags
; CHECK: [[COPY1:%[0-9]+]]:gr64 = COPY [[DEF2]]
; CHECK: dead [[MOV64rm]]:gr64, dead [[COPY1]]:gr64, dead [[DEF1]]:gr64, dead [[DEF]]:gr64 = STATEPOINT 1, 16, 5, undef %41:gr64, undef $edi, undef $rsi, $rdx, $ecx, undef $r8d, 2, 0, 2, 0, 2, 89, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[COPY1]], 2, 7, 2, 0, 2, 0, [[COPY1]], 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, [[COPY1]], 2, 0, [[COPY1]], 2, 7, 2, 0, 2, 0, [[COPY1]], 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, [[DEF1]], 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF]], 2, 3, 1, 4, %stack.0, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF]], 2, 8, 2, 9, 2, 34, 2, 0, 2, 3, 2, 1, 2, 0, [[DEF1]], 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 5, [[MOV64rm]](tied-def 0), [[COPY1]](tied-def 1), [[DEF1]](tied-def 2), 2, 4278124286, [[DEF]](tied-def 3), 2, 0, 2, 5, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store 4 on %stack.0)
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: EH_LABEL <mcsymbol .Ltmp1>
; CHECK: JMP_1 %bb.10
; CHECK: bb.10.bb25:
; CHECK: successors: %bb.11(0x80000000)
; CHECK: [[DEF3:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: [[DEF3:%[0-9]+]]:gr64 = IMPLICIT_DEF
; CHECK: undef [[DEF2]].sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
; CHECK: bb.11.bb27:
; CHECK: successors: %bb.2(0x80000000), %bb.17(0x00000000)
; CHECK: TEST32rr [[ADD32rr]], [[ADD32rr]], implicit-def $eflags
; CHECK: [[COPY2:%[0-9]+]]:gr32 = COPY [[ADD32rr]]
; CHECK: JCC_1 %bb.2, 8, implicit $eflags
; CHECK: JMP_1 %bb.17
; CHECK: bb.12.bb35 (landing-pad):
; CHECK: successors: %bb.14(0x40000000), %bb.13(0x40000000)
; CHECK: liveins: $rax, $rdx
; CHECK: EH_LABEL <mcsymbol .Ltmp2>
; CHECK: [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
; CHECK: TEST8rr [[MOV32r0_]].sub_8bit, [[MOV32r0_]].sub_8bit, implicit-def $eflags
; CHECK: JCC_1 %bb.14, 5, implicit $eflags
; CHECK: JMP_1 %bb.13
; CHECK: bb.13.bb37:
; CHECK: successors:
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $edi = MOV32ri 3
; CHECK: STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 87, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 3, [[ADD32rr]], 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 0, 2, 9, 2, 51, 2, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: bb.14.bb39:
; CHECK: successors:
; CHECK: bb.15.bb40:
; CHECK: successors: %bb.16(0x80000000)
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: CALL64pcrel32 target-flags(x86-plt) @wombat, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: bb.16.bb41:
; CHECK: successors:
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $edi = MOV32ri -39
; CHECK: STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 103, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 63, 2, 0, 2, 9, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 3, [[COPY2]], 2, 3, 2, 0, 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 33, 2, 6, 2, 0, 2, 5, 2, 0, 2, 0, 2, 4278124286, 2, 3, [[COPY2]], 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 1, 2, 34, 2, 14, 2, 0, 2, 3, 2, 0, 2, 3, [[COPY2]], 2, 3, 2, 4278124286, 2, 3, 2, 0, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: bb.17.bb44:
; CHECK: successors: %bb.22(0x40000000), %bb.18(0x40000000)
; CHECK: [[COPY3:%[0-9]+]]:gr64 = COPY [[DEF2]]
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: CALL64pcrel32 target-flags(x86-plt) @hoge.1, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: [[MOV32r0_1:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
; CHECK: TEST8rr [[MOV32r0_1]].sub_8bit, [[MOV32r0_1]].sub_8bit, implicit-def $eflags
; CHECK: JCC_1 %bb.22, 5, implicit $eflags
; CHECK: JMP_1 %bb.18
; CHECK: bb.18.bb45:
; CHECK: successors: %bb.19(0x40000000), %bb.20(0x40000000)
; CHECK: [[MOV32r0_2:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
; CHECK: TEST8rr [[MOV32r0_2]].sub_8bit, [[MOV32r0_2]].sub_8bit, implicit-def $eflags
; CHECK: JCC_1 %bb.20, 4, implicit $eflags
; CHECK: bb.19:
; CHECK: successors: %bb.24(0x80000000)
; CHECK: JMP_1 %bb.24
; CHECK: bb.20.bb46:
; CHECK: successors: %bb.21(0x40000000), %bb.23(0x40000000)
; CHECK: EH_LABEL <mcsymbol .Ltmp3>
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $ecx = MOV32r0 implicit-def dead $eflags
; CHECK: [[STATEPOINT:%[0-9]+]]:gr64 = STATEPOINT 1, 16, 5, undef %60:gr64, undef $edi, undef $rsi, undef $rdx, $ecx, undef $r8d, 2, 0, 2, 0, 2, 45, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, [[STATEPOINT]], 2, 0, [[STATEPOINT]], 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 8, 2, 9, 2, 34, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, [[STATEPOINT]](tied-def 0), 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: EH_LABEL <mcsymbol .Ltmp4>
; CHECK: JMP_1 %bb.21
; CHECK: bb.21.bb48:
; CHECK: successors: %bb.24(0x80000000)
; CHECK: JMP_1 %bb.24
; CHECK: bb.22.bb50:
; CHECK: successors:
; 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 [[STATEPOINT]]:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 45, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, [[STATEPOINT]], 2, 0, [[STATEPOINT]], 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 1, 2, 9, 2, 6, 2, 1, 2, 3, 2, 0, 2, 0, 2, 0, 2, 0, 2, 4278124286, 2, 0, 2, 0, 2, 7, 2, 0, 2, 3, [[STATEPOINT]](tied-def 0), 2, 0, 2, 4278124286, 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: bb.23.bb52 (landing-pad):
; CHECK: successors:
; CHECK: liveins: $rax, $rdx
; CHECK: EH_LABEL <mcsymbol .Ltmp5>
; CHECK: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: $edi = MOV32ri 3
; CHECK: dead [[STATEPOINT]]:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 43, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, [[STATEPOINT]], 2, 0, [[STATEPOINT]], 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 0, 2, 9, 2, 51, 2, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, [[STATEPOINT]](tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK: bb.24.bb56:
; 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 [[STATEPOINT]]:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 33, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 9, 2, 2, 2, 26, 2, 1, 2, 3, 2, 1, 2, 0, 2, 0, 2, 0, [[STATEPOINT]], 2, 0, [[STATEPOINT]], 2, 7, 2, 0, 2, 0, [[STATEPOINT]], 2, 2, [[STATEPOINT]](tied-def 0), 2, 0, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
; CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.0.bb:
successors: %bb.1(0x80000000), %bb.12(0x00000000)
liveins: $rdi
%14:gr64 = COPY $rdi
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$rdi = COPY %14
dead %14:gr64 = STATEPOINT 2, 5, 2, undef %15:gr64, $rdi, undef $rsi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 10, 2, 0, 2, 6, 2, 0, 2, 4, 2, 1, 2, 0, %14, 2, 7, 2, 0, 2, 0, %14, 2, 7, 2, 0, 2, 0, %14, 2, 2, 2, 1, 2, 5, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, %14(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%77:gr32 = MOV32r0 implicit-def dead $eflags
TEST8rr %77.sub_8bit, %77.sub_8bit, implicit-def $eflags
JCC_1 %bb.12, 5, implicit $eflags
JMP_1 %bb.1
bb.1.bb6:
successors: %bb.2(0x80000000)
%0:gr64 = MOV64rm undef %17:gr64, 1, $noreg, 0, $noreg :: (load unordered 8 from `i8 addrspace(1)* addrspace(1)* undef`, addrspace 1)
%0:gr64 = NOT64r %0
undef %48.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
%1:gr64 = IMPLICIT_DEF
%2:gr64 = IMPLICIT_DEF
%3:gr64_with_sub_8bit = IMPLICIT_DEF
%77:gr32 = MOV32r0 implicit-def dead $eflags
bb.2.bb7:
successors: %bb.22(0x00000000), %bb.3(0x80000000)
TEST8rr %48.sub_8bit, %48.sub_8bit, implicit-def $eflags
JCC_1 %bb.3, 4, implicit $eflags
bb.22:
successors: %bb.13(0x80000000)
JMP_1 %bb.13
bb.3.bb7:
successors: %bb.23(0x00000000), %bb.4(0x80000000)
TEST8rr %48.sub_8bit, %48.sub_8bit, implicit-def $eflags
JCC_1 %bb.4, 4, implicit $eflags
bb.23:
successors: %bb.13(0x80000000)
JMP_1 %bb.13
bb.4.bb7:
successors: %bb.13(0x00000000), %bb.5(0x80000000)
%5:gr32 = MOV32rm undef %24:gr64, 1, $noreg, 0, $noreg :: (load unordered 4 from `i32 addrspace(1)* undef`, align 8, addrspace 1)
%5:gr32 = ADD32rr %5, %77, implicit-def dead $eflags
CMP32rr %77, %5, implicit-def $eflags
JCC_1 %bb.13, 15, implicit $eflags
JMP_1 %bb.5
bb.5.bb20:
successors: %bb.21(0x40000000), %bb.6(0x40000000)
TEST8rr %48.sub_8bit, %48.sub_8bit, implicit-def $eflags
JCC_1 %bb.6, 4, implicit $eflags
bb.21:
successors: %bb.8(0x80000000)
JMP_1 %bb.8
bb.6.bb23:
successors: %bb.7(0x7ffff800), %bb.9(0x00000800)
MOV32mr %stack.0, 1, $noreg, 0, $noreg, %5 :: (store 4 into %stack.0)
EH_LABEL <mcsymbol .Ltmp0>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%32:gr64 = COPY %0
dead $edx = MOV32r0 implicit-def dead $eflags, implicit-def $rdx
$ecx = MOV32r0 implicit-def dead $eflags
dead %32:gr64, dead %3:gr64_with_sub_8bit, dead %2:gr64, dead %1:gr64 = STATEPOINT 1, 16, 5, undef %41:gr64, undef $edi, undef $rsi, $rdx, $ecx, undef $r8d, 2, 0, 2, 0, 2, 89, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, %3, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, %2, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %1, 2, 3, 1, 4, %stack.0, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %1, 2, 8, 2, 9, 2, 34, 2, 0, 2, 3, 2, 1, 2, 0, %2, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 5, %32(tied-def 0), %3(tied-def 1), %2(tied-def 2), 2, 4278124286, %1(tied-def 3), 2, 0, 2, 5, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store 4 on %stack.0)
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp1>
JMP_1 %bb.7
bb.7.bb25:
successors: %bb.8(0x80000000)
%1:gr64 = IMPLICIT_DEF
%2:gr64 = IMPLICIT_DEF
undef %3.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
bb.8.bb27:
successors: %bb.2(0x80000000), %bb.14(0x00000000)
TEST32rr %5, %5, implicit-def $eflags
%77:gr32 = COPY %5
JCC_1 %bb.2, 8, implicit $eflags
JMP_1 %bb.14
bb.9.bb35 (landing-pad):
successors: %bb.11(0x40000000), %bb.10(0x40000000)
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp2>
%44:gr32 = MOV32r0 implicit-def dead $eflags
TEST8rr %44.sub_8bit, %44.sub_8bit, implicit-def $eflags
JCC_1 %bb.11, 5, implicit $eflags
JMP_1 %bb.10
bb.10.bb37:
successors:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$edi = MOV32ri 3
STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 87, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 3, %5, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 0, 2, 9, 2, 51, 2, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.11.bb39:
successors:
bb.12.bb40:
successors: %bb.13(0x80000000)
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
CALL64pcrel32 target-flags(x86-plt) @wombat, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.13.bb41:
successors:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$edi = MOV32ri -39
STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 103, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 63, 2, 0, 2, 9, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 3, %77, 2, 3, 2, 0, 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 33, 2, 6, 2, 0, 2, 5, 2, 0, 2, 0, 2, 4278124286, 2, 3, %77, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 1, 2, 34, 2, 14, 2, 0, 2, 3, 2, 0, 2, 3, %77, 2, 3, 2, 4278124286, 2, 3, 2, 0, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.14.bb44:
successors: %bb.18(0x40000000), %bb.15(0x40000000)
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
CALL64pcrel32 target-flags(x86-plt) @hoge.1, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%50:gr32 = MOV32r0 implicit-def dead $eflags
TEST8rr %50.sub_8bit, %50.sub_8bit, implicit-def $eflags
JCC_1 %bb.18, 5, implicit $eflags
JMP_1 %bb.15
bb.15.bb45:
successors: %bb.24(0x40000000), %bb.16(0x40000000)
%52:gr32 = MOV32r0 implicit-def dead $eflags
TEST8rr %52.sub_8bit, %52.sub_8bit, implicit-def $eflags
JCC_1 %bb.16, 4, implicit $eflags
bb.24:
successors: %bb.20(0x80000000)
JMP_1 %bb.20
bb.16.bb46:
successors: %bb.17(0x40000000), %bb.19(0x40000000)
EH_LABEL <mcsymbol .Ltmp3>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$ecx = MOV32r0 implicit-def dead $eflags
%3:gr64_with_sub_8bit = STATEPOINT 1, 16, 5, undef %60:gr64, undef $edi, undef $rsi, undef $rdx, $ecx, undef $r8d, 2, 0, 2, 0, 2, 45, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, %3, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 8, 2, 9, 2, 34, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, %3(tied-def 0), 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp4>
JMP_1 %bb.17
bb.17.bb48:
successors: %bb.20(0x80000000)
JMP_1 %bb.20
bb.18.bb50:
successors:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$edi = MOV32ri 10
dead %3:gr64_with_sub_8bit = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 45, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, %3, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 1, 2, 9, 2, 6, 2, 1, 2, 3, 2, 0, 2, 0, 2, 0, 2, 0, 2, 4278124286, 2, 0, 2, 0, 2, 7, 2, 0, 2, 3, %3(tied-def 0), 2, 0, 2, 4278124286, 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.19.bb52 (landing-pad):
successors:
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp5>
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$edi = MOV32ri 3
dead %3:gr64_with_sub_8bit = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 43, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, %3, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 0, 2, 9, 2, 51, 2, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, %3(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
bb.20.bb56:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
$edi = MOV32ri 10
dead %3:gr64_with_sub_8bit = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 33, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 9, 2, 2, 2, 26, 2, 1, 2, 3, 2, 1, 2, 0, 2, 0, 2, 0, %3, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 2, %3(tied-def 0), 2, 0, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
...

View File

@ -1,84 +1,65 @@
# RUN: not --crash llc -x mir -o /dev/null %s -run-pass=twoaddressinstruction,simple-register-coalescing,greedy -verify-regalloc 2>&1 | FileCheck %s
# RUN: llc -x mir -o - %s -run-pass=twoaddressinstruction,simple-register-coalescing,greedy -verify-regalloc 2>&1 | FileCheck %s
# The test checks the verification catch the case when RA splits live interval in the
# way the def is located after invoke statepoint while use is in landing pad.
# The test checks no verification errors happen in the case of
# statepoint invoke instruction with tied-defs.
# CHECK: bb.0.bb:
# CHECK: successors: %bb.1(0x80000000), %bb.2(0x00000000)
# CHECK: liveins: $rdi, $esi, $rdx
# CHECK: %8:gr64 = COPY $rdx
# CHECK: %7:gr32 = COPY $esi
# CHECK: %6:gr64 = COPY $rdi
# CHECK: %30:gr64 = MOV64rm $noreg, 1, $noreg, 0, $noreg :: (load 8 from `i8 addrspace(1)* addrspace(1)* null`, addrspace 1)
# CHECK: undef %33.sub_32bit:gr64_nosp = MOV32rm $noreg, 1, $noreg, 0, $noreg :: (load 4 from `i32 addrspace(1)* null`, addrspace 1)
# CHECK: %35:gr32 = MOV32rm %8, 1, $noreg, 96, $noreg :: (load 4 from %ir.tmp4, addrspace 1)
# CHECK: %43:gr32 = MOV32rm %8, 1, $noreg, 160, $noreg :: (load 4 from %ir.tmp6, addrspace 1)
# CHECK: %41:gr64 = MOV64rm undef %15:gr64, 1, $noreg, 0, $noreg :: (load 8 from `i8 addrspace(1)* addrspace(1)* undef`, addrspace 1)
# CHECK: %38:gr32 = MOV32rm %8, 1, $noreg, 352, $noreg :: (load 4 from %ir.tmp10, addrspace 1)
# CHECK: %31:gr64 = MOV64rm %6, 1, $noreg, 96, $noreg :: (load 8 from %ir.tmp13, addrspace 1)
# CHECK: %32:gr64 = MOV64rm %6, 1, $noreg, 104, $noreg :: (load 8 from %ir.tmp16, addrspace 1)
# CHECK: %45:gr32 = LEA64_32r %33, 1, $noreg, -1, $noreg
# CHECK: MOV32mr %stack.1, 1, $noreg, 0, $noreg, %7 :: (store 4 into %stack.1)
# CHECK: MOV32mr %stack.9, 1, $noreg, 0, $noreg, %45 :: (store 4 into %stack.9)
# CHECK: MOV32mr %stack.0, 1, $noreg, 0, $noreg, %45 :: (store 4 into %stack.0)
# CHECK: MOV32mr %stack.2, 1, $noreg, 0, $noreg, %33.sub_32bit :: (store 4 into %stack.2)
# CHECK: MOV32mr %stack.6, 1, $noreg, 0, $noreg, %35 :: (store 4 into %stack.6)
# CHECK: MOV32mr %stack.3, 1, $noreg, 0, $noreg, %35 :: (store 4 into %stack.3)
# CHECK: MOV32mr %stack.8, 1, $noreg, 0, $noreg, %43 :: (store 4 into %stack.8)
# CHECK: MOV32mr %stack.4, 1, $noreg, 0, $noreg, %43 :: (store 4 into %stack.4)
# CHECK: MOV32mr %stack.7, 1, $noreg, 0, $noreg, %38 :: (store 4 into %stack.7)
# CHECK: MOV32mr %stack.5, 1, $noreg, 0, $noreg, %38 :: (store 4 into %stack.5)
# CHECK: EH_LABEL <mcsymbol .Ltmp0>
# 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: %40:gr64 = COPY %41
# CHECK: %32:gr64, %31:gr64, %30:gr64, %40: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, %30, 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, %40, 1, 4, %stack.5, 0, %31, %32, 2, 4, %32(tied-def 0), %31(tied-def 1), %30(tied-def 2), %40(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 4 on %stack.0), (volatile load store 4 on %stack.1), (volatile load store 4 on %stack.2), (volatile load store 4 on %stack.3), (volatile load store 4 on %stack.4), (volatile load store 4 on %stack.5)
# CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
# CHECK: EH_LABEL <mcsymbol .Ltmp1>
# 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 %30:gr64, dead %31:gr64, dead %32:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @quux, $edi, 2, 0, 2, 2, 2, 10, 1, 4, %stack.9, 0, %30, %7, %33.sub_32bit, 1, 4, %stack.6, 0, 1, 4, %stack.8, 0, %33.sub_32bit, 1, 4, %stack.7, 0, %31, %32, 2, 3, %30(tied-def 0), %31(tied-def 1), %32(tied-def 2), 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp :: (load 4 from %stack.6), (load 4 from %stack.7), (load 4 from %stack.8), (load 4 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):
# CHECK: liveins: $rax, $rdx
# CHECK: EH_LABEL <mcsymbol .Ltmp2>
# CHECK: MOV32mr %stack.1, 1, $noreg, 0, $noreg, %33.sub_32bit :: (store 4 into %stack.1)
# CHECK: MOV32mr %stack.0, 1, $noreg, 0, $noreg, %7 :: (store 4 into %stack.0)
# CHECK: %36:gr32 = MOV32rm %stack.6, 1, $noreg, 0, $noreg :: (load 4 from %stack.6)
# CHECK: MOV32mr %stack.2, 1, $noreg, 0, $noreg, %36 :: (store 4 into %stack.2)
# CHECK: MOV32mr %stack.3, 1, $noreg, 0, $noreg, %33.sub_32bit :: (store 4 into %stack.3)
# CHECK: %39:gr32 = MOV32rm %stack.7, 1, $noreg, 0, $noreg :: (load 4 from %stack.7)
# CHECK: MOV32mr %stack.4, 1, $noreg, 0, $noreg, %39 :: (store 4 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 %40: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, %40, 1, 4, %stack.4, 0, 2, 1, %40(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store 4 on %stack.0), (volatile load store 4 on %stack.1), (volatile load store 4 on %stack.2), (volatile load store 4 on %stack.3), (volatile load store 4 on %stack.4)
# CHECK: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
# CHECK: # Machine code for function wombat: NoPHIs, TracksLiveness, TiedOpsRewritten
# CHECK: Frame Objects:
# CHECK: fi#0: size=4, align=4, at location [SP+8]
# CHECK: fi#1: size=4, align=4, at location [SP+8]
# CHECK: fi#2: size=4, align=4, at location [SP+8]
# CHECK: fi#3: size=4, align=4, at location [SP+8]
# CHECK: fi#4: size=4, align=4, at location [SP+8]
# CHECK: fi#5: size=4, align=4, at location [SP+8]
# CHECK: fi#6: size=4, align=4, at location [SP+8]
# CHECK: fi#7: size=4, align=4, at location [SP+8]
# CHECK: Function Live Ins: $rdi in %6, $esi in %7, $rdx in %8
# CHECK: 0B bb.0.bb:
# CHECK: successors: %bb.1(0x80000000), %bb.2(0x00000000); %bb.1(100.00%), %bb.2(0.00%)
# CHECK: liveins: $rdi, $esi, $rdx
# CHECK: 16B %8:gr64 = COPY $rdx
# CHECK: 32B %7:gr32 = COPY $esi
# CHECK: 48B %6:gr64 = COPY $rdi
# CHECK: 64B %30:gr64 = MOV64rm $noreg, 1, $noreg, 0, $noreg :: (load 8 from `i8 addrspace(1)* addrspace(1)* null`, addrspace 1)
# CHECK: 80B undef %33.sub_32bit:gr64_nosp = MOV32rm $noreg, 1, $noreg, 0, $noreg :: (load 4 from `i32 addrspace(1)* null`, addrspace 1)
# CHECK: 112B %35:gr32 = MOV32rm %8:gr64, 1, $noreg, 96, $noreg :: (load 4 from %ir.tmp4, addrspace 1)
# CHECK: 128B %2:gr32 = MOV32rm %8:gr64, 1, $noreg, 160, $noreg :: (load 4 from %ir.tmp6, addrspace 1)
# CHECK: 144B %41:gr64 = MOV64rm undef %15:gr64, 1, $noreg, 0, $noreg :: (load 8 from `i8 addrspace(1)* addrspace(1)* undef`, addrspace 1)
# CHECK: 160B %38:gr32 = MOV32rm %8:gr64, 1, $noreg, 352, $noreg :: (load 4 from %ir.tmp10, addrspace 1)
# CHECK: 176B %31:gr64 = MOV64rm %6:gr64, 1, $noreg, 96, $noreg :: (load 8 from %ir.tmp13, addrspace 1)
# CHECK: 192B %32:gr64 = MOV64rm %6:gr64, 1, $noreg, 104, $noreg :: (load 8 from %ir.tmp16, addrspace 1)
# CHECK: 224B %5:gr32 = LEA64_32r %33:gr64_nosp, 1, $noreg, -1, $noreg
# CHECK: 240B MOV32mr %stack.1, 1, $noreg, 0, $noreg, %7:gr32 :: (store 4 into %stack.1)
# CHECK: 256B MOV32mr %stack.0, 1, $noreg, 0, $noreg, %5:gr32 :: (store 4 into %stack.0)
# CHECK: 272B MOV32mr %stack.2, 1, $noreg, 0, $noreg, %33.sub_32bit:gr64_nosp :: (store 4 into %stack.2)
# CHECK: 280B MOV32mr %stack.6, 1, $noreg, 0, $noreg, %35:gr32 :: (store 4 into %stack.6)
# CHECK: 288B MOV32mr %stack.3, 1, $noreg, 0, $noreg, %35:gr32 :: (store 4 into %stack.3)
# CHECK: 304B MOV32mr %stack.4, 1, $noreg, 0, $noreg, %2:gr32 :: (store 4 into %stack.4)
# CHECK: 312B MOV32mr %stack.7, 1, $noreg, 0, $noreg, %38:gr32 :: (store 4 into %stack.7)
# CHECK: 320B MOV32mr %stack.5, 1, $noreg, 0, $noreg, %38:gr32 :: (store 4 into %stack.5)
# CHECK: 336B EH_LABEL <mcsymbol .Ltmp0>
# CHECK: 352B ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
# CHECK: 400B $edi = MOV32r0 implicit-def dead $eflags
# CHECK: 416B dead $esi = MOV32r0 implicit-def dead $eflags, implicit-def $rsi
# CHECK: 432B $ecx = COPY %7:gr32
# CHECK: 448B $r8d = MOV32r0 implicit-def dead $eflags
# CHECK: 528B %32:gr64, %31:gr64, %30:gr64, %41: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, %30:gr64, 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, %41:gr64, 1, 4, %stack.5, 0, %31:gr64, %32:gr64, 2, 4, %32:gr64(tied-def 0), %31:gr64(tied-def 1), %30:gr64(tied-def 2), %41:gr64(tied-def 3), 2, 0, 2, 4, 0, 0, 1, 1, 2, 2, 3, 3, <regmask $bh $bl $bp $bph $bpl $bx $ebp $ebx $hbp $hbx $rbp $rbx $r12 $r13 $r14 $r15 $r12b $r13b $r14b $r15b $r12bh $r13bh $r14bh $r15bh $r12d $r13d $r14d $r15d $r12w $r13w $r14w $r15w $r12wh and 3 more...>, implicit-def $rsp, implicit-def $ssp, implicit-def dead $eax :: (volatile load store 4 on %stack.0), (volatile load store 4 on %stack.1), (volatile load store 4 on %stack.2), (volatile load store 4 on %stack.3), (volatile load store 4 on %stack.4), (volatile load store 4 on %stack.5)
# CHECK: 536B %40:gr64 = COPY %41:gr64
# CHECK: 544B ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
# CHECK: 560B EH_LABEL <mcsymbol .Ltmp1>
# CHECK: 576B JMP_1 %bb.1
# CHECK: 592B bb.1.bb21:
# CHECK: ; predecessors: %bb.0
# CHECK: 608B ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
# CHECK: 640B $edi = MOV32ri 10
# CHECK: 704B dead %30:gr64, dead %31:gr64, dead %32:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @quux, $edi, 2, 0, 2, 2, 2, 10, %5:gr32, %30:gr64, %7:gr32, %33.sub_32bit:gr64_nosp, 1, 4, %stack.6, 0, %2:gr32, %33.sub_32bit:gr64_nosp, 1, 4, %stack.7, 0, %31:gr64, %32:gr64, 2, 3, %30:gr64(tied-def 0), %31:gr64(tied-def 1), %32:gr64(tied-def 2), 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, <regmask $bh $bl $bp $bph $bpl $bx $ebp $ebx $hbp $hbx $rbp $rbx $r12 $r13 $r14 $r15 $r12b $r13b $r14b $r15b $r12bh $r13bh $r14bh $r15bh $r12d $r13d $r14d $r15d $r12w $r13w $r14w $r15w $r12wh and 3 more...>, implicit-def $rsp, implicit-def $ssp :: (load 4 from %stack.6), (load 4 from %stack.7)
# CHECK: 720B ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
# CHECK: 736B RET 0
# CHECK: 752B bb.2.bb26 (landing-pad):
# CHECK: ; predecessors: %bb.0
# CHECK: liveins: $rax, $rdx
# CHECK: 768B EH_LABEL <mcsymbol .Ltmp2>
# CHECK: 784B MOV32mr %stack.1, 1, $noreg, 0, $noreg, %33.sub_32bit:gr64_nosp :: (store 4 into %stack.1)
# CHECK: 800B MOV32mr %stack.0, 1, $noreg, 0, $noreg, %7:gr32 :: (store 4 into %stack.0)
# CHECK: 808B %36:gr32 = MOV32rm %stack.6, 1, $noreg, 0, $noreg :: (load 4 from %stack.6)
# CHECK: 816B MOV32mr %stack.2, 1, $noreg, 0, $noreg, %36:gr32 :: (store 4 into %stack.2)
# CHECK: 832B MOV32mr %stack.3, 1, $noreg, 0, $noreg, %33.sub_32bit:gr64_nosp :: (store 4 into %stack.3)
# CHECK: 840B %39:gr32 = MOV32rm %stack.7, 1, $noreg, 0, $noreg :: (load 4 from %stack.7)
# CHECK: 848B MOV32mr %stack.4, 1, $noreg, 0, $noreg, %39:gr32 :: (store 4 into %stack.4)
# CHECK: 864B ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
# CHECK: 896B $edi = MOV32ri -271
# CHECK: 928B dead %40: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, %40:gr64, 1, 4, %stack.4, 0, 2, 1, %40:gr64(tied-def 0), 2, 0, 2, 1, 0, 0, <regmask $bh $bl $bp $bph $bpl $bx $ebp $ebx $hbp $hbx $rbp $rbx $r12 $r13 $r14 $r15 $r12b $r13b $r14b $r15b $r12bh $r13bh $r14bh $r15bh $r12d $r13d $r14d $r15d $r12w $r13w $r14w $r15w $r12wh and 3 more...>, implicit-def $rsp, implicit-def $ssp :: (volatile load store 4 on %stack.0), (volatile load store 4 on %stack.1), (volatile load store 4 on %stack.2), (volatile load store 4 on %stack.3), (volatile load store 4 on %stack.4)
# CHECK: 944B ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
# CHECK: # End machine code for function wombat.
# CHECK: *** Bad machine code: Register not marked live out of predecessor ***
# CHECK: - function: wombat
# CHECK: - basic block: %bb.0 bb
# CHECK: - liverange: [536r,592B:0)[752B,928r:0)[928r,928d:1) 0@536r 1@928r
# CHECK: - v. register: %40
# CHECK: - ValNo: 0 (def 536r)
# CHECK: live into %bb.2@752B, not live before 528d
# CHECK: LLVM ERROR: Found 1 machine code errors.
--- |
; ModuleID = './statepoint-invoke-ra1.ll'
source_filename = "./statepoint-invoke-ra1.ll"
@ -209,23 +190,23 @@ frameInfo:
restorePoint: ''
fixedStack: []
stack:
- { id: 0, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
- { id: 0, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
- { id: 1, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
- { id: 1, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
- { id: 2, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
- { id: 2, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
- { id: 3, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
- { id: 3, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
- { id: 4, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
- { id: 4, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
- { id: 5, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
- { id: 5, name: '', type: default, offset: 0, size: 4, alignment: 4,
stack-id: default, callee-saved-register: '', callee-saved-restored: true,
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
callSites: []
debugValueSubstitutions: []
@ -235,7 +216,7 @@ body: |
bb.0.bb:
successors: %bb.1(0x80000000), %bb.2(0x00000000)
liveins: $rdi, $esi, $rdx
%8:gr64 = COPY killed $rdx
%7:gr32 = COPY killed $esi
%6:gr64 = COPY killed $rdi
@ -267,7 +248,7 @@ body: |
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
EH_LABEL <mcsymbol .Ltmp1>
JMP_1 %bb.1
bb.1.bb21:
ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
%29:gr32 = MOV32ri 10
@ -275,10 +256,10 @@ body: |
dead %30:gr64, dead %31:gr64, dead %32:gr64 = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @quux, killed $edi, 2, 0, 2, 2, 2, 10, killed %5, killed %11, killed %7, killed %0, killed %1, killed %2, killed %3, killed %4, killed %10, killed %9, 2, 3, %11(tied-def 0), %10(tied-def 1), %9(tied-def 2), 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp
ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
RET 0
bb.2.bb26 (landing-pad):
liveins: $rax, $rdx
EH_LABEL <mcsymbol .Ltmp2>
MOV32mr %stack.1, 1, $noreg, 0, $noreg, killed %0 :: (store 4 into %stack.1)
MOV32mr %stack.0, 1, $noreg, 0, $noreg, killed %7 :: (store 4 into %stack.0)