Skip to content

Commit 90ef12f

Browse files
[SelectionDAG][InstrRef] Handle entry values separately in the emitter
1 parent 7c6af65 commit 90ef12f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,8 @@ InstrEmitter::EmitDbgInstrRef(SDDbgValue *SD,
779779
// If this variable location does not depend on any instructions or contains
780780
// any stack locations, produce it as a standard debug value instead.
781781
if (any_of(SD->getLocationOps(), IsInvalidOp) ||
782-
all_of(SD->getLocationOps(), IsNonInstrRefOp)) {
782+
all_of(SD->getLocationOps(), IsNonInstrRefOp) ||
783+
Expr->isEntryValue()) {
783784
if (SD->isVariadic())
784785
return EmitDbgValueList(SD, VRBaseMap);
785786
return EmitDbgValueFromSingleOp(SD, VRBaseMap);

llvm/test/CodeGen/AArch64/dbg-value-swift-async.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; RUN: llc --mtriple="aarch64-" -O0 -global-isel -stop-after=irtranslator -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=AARCH
22
; RUN: llc --mtriple="aarch64-" -O0 -fast-isel=false -global-isel=false -stop-after=finalize-isel %s -o - | FileCheck %s --check-prefix=AARCH
33
; RUN: llc --mtriple="aarch64-" -O0 -fast-isel -stop-after=finalize-isel %s -o - | FileCheck %s --check-prefix=AARCH
4+
; RUN: llc --mtriple="aarch64-" -experimental-debug-variable-locations -fast-isel=false -global-isel=false -stop-after=finalize-isel %s -o - | FileCheck %s --check-prefix=AARCH
45

56

67
; RUN: llc --mtriple="x86_64-" -O0 -fast-isel=false -global-isel=false -stop-after=finalize-isel %s -o - | FileCheck %s --check-prefix=X86

0 commit comments

Comments
 (0)