Skip to content

Commit ae3b2b6

Browse files
committed
arsenm's comment
1 parent 57e9fe5 commit ae3b2b6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3693,8 +3693,11 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
36933693
Results.push_back(DAG.getUNDEF(Node->getValueType(0)));
36943694
Results.push_back(Node->getOperand(0));
36953695

3696+
const char *IntrinsicName = Node->getOpcode() == ISD::STACKADDRESS
3697+
? "llvm.stackaddress"
3698+
: "llvm.stacksave";
36963699
DAG.getContext()->diagnose(DiagnosticInfoLegalizationFailure(
3697-
Node->getOperationName(&DAG) + " is not supported on this target.",
3700+
Twine(IntrinsicName) + " is not supported on this target.",
36983701
DAG.getMachineFunction().getFunction(), dl.getDebugLoc()));
36993702
}
37003703
break;

llvm/test/CodeGen/NVPTX/stackaddress.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
declare ptr @llvm.stackaddress.p0()
44

55
define ptr @test() {
6-
; CHECK: error: <unknown>:0:0: STACKADDRESS is not supported on this target.
6+
; CHECK: error: <unknown>:0:0: llvm.stackaddress is not supported on this target.
77
%sp = call ptr @llvm.stackaddress.p0()
88
ret ptr %sp
99
}

0 commit comments

Comments
 (0)