mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
[GISel][RegBankSelect] Hide assertion failure from LLT::getScalarSizeInBits [2/14]
Summary: It looks like RegBankSelect can try to assign a bank based on a DBG_VALUE instead of ignoring it. This eventually leads to an assert in AArch64RegisterBankInfo::getInstrMapping because there is some info missing from the DBG_VALUE MachineOperand (I see: `Assertion failed: (RawData != 0 && "Invalid Type"), function getScalarSizeInBits`). I'm not 100% sure it's safe to insert DBG_VALUE instructions right before RegBankSelect (that's what -debugify-and-strip-all-safe is doing). Any advice appreciated. Depends on D78135. Reviewers: ab, qcolombet, dsanders, aprantl Subscribers: kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78137
This commit is contained in:
parent
327d4464a3
commit
0978def859
@ -693,6 +693,10 @@ bool RegBankSelect::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
if (isTargetSpecificOpcode(MI.getOpcode()) && !MI.isPreISelOpcode())
|
if (isTargetSpecificOpcode(MI.getOpcode()) && !MI.isPreISelOpcode())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Ignore debug info.
|
||||||
|
if (MI.isDebugInstr())
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!assignInstr(MI)) {
|
if (!assignInstr(MI)) {
|
||||||
reportGISelFailure(MF, *TPC, *MORE, "gisel-regbankselect",
|
reportGISelFailure(MF, *TPC, *MORE, "gisel-regbankselect",
|
||||||
"unable to map instruction", MI);
|
"unable to map instruction", MI);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# RUN: llc -O0 -run-pass=regbankselect %s -o - -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=FAST
|
# RUN: llc -O0 -debugify-and-strip-all-safe -run-pass=regbankselect %s -o - -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=FAST
|
||||||
# RUN: llc -O0 -run-pass=regbankselect %s -regbankselect-greedy -o - -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=GREEDY
|
# RUN: llc -O0 -debugify-and-strip-all-safe -run-pass=regbankselect %s -regbankselect-greedy -o - -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=GREEDY
|
||||||
|
|
||||||
--- |
|
--- |
|
||||||
; ModuleID = 'generic-virtual-registers-type-error.mir'
|
; ModuleID = 'generic-virtual-registers-type-error.mir'
|
||||||
|
Loading…
Reference in New Issue
Block a user