Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Attribute isBitcast to PTR_TO_INT pseudoinstruction #388

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions llvm/lib/CodeGen/RegisterCoalescer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3536,6 +3536,10 @@ bool RegisterCoalescer::isHighCostLiveInterval(LiveInterval &LI) {
}

bool RegisterCoalescer::joinVirtRegs(CoalescerPair &CP) {
// begin EraVM
// FIXME iz experiment: try to fix cross-class copying losing pointer tag
if (CP.isCrossClass()) return false;
// end EraVM ---
SmallVector<VNInfo*, 16> NewVNInfo;
LiveInterval &RHS = LIS->getInterval(CP.getSrcReg());
LiveInterval &LHS = LIS->getInterval(CP.getDstReg());
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/Target/EraVM/EraVMInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ multiclass PtrInstr<bits<8> opcode, string asmstring, SDPatternOperator node> {
}

// This is a bridge to convert GRPTR type to GR256 type. It will get eliminated in a post RA pass.
let isBitcast = 1, isAsCheapAsAMove = 1, canFoldAsLoad = 1 in
def PTR_TO_INT : Pseudo<(outs GR256:$rd0), (ins GRPTR:$rs0),
"ptrtoint\t$rs0, $rd0",
[(set GR256:$rd0, (EraVMptr_to_int GRPTR:$rs0))]>;
Expand Down