[PATCH] D42543: Change diagnostic message in verifier about incorrect alloca address space
Yaxun Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 08:37:30 PST 2018
yaxunl created this revision.
yaxunl added reviewers: arsenm, aprantl.
Herald added subscribers: nhaehnle, wdng.
This patch depends on https://reviews.llvm.org/D41832
https://reviews.llvm.org/D42543
Files:
lib/IR/Verifier.cpp
test/Assembler/datalayout-alloca-addrspace-mismatch-0.ll
test/Assembler/datalayout-alloca-addrspace-mismatch-1.ll
test/Assembler/datalayout-alloca-addrspace-mismatch-2.ll
test/CodeGen/AMDGPU/invalid-alloca.ll
Index: test/CodeGen/AMDGPU/invalid-alloca.ll
===================================================================
--- test/CodeGen/AMDGPU/invalid-alloca.ll
+++ test/CodeGen/AMDGPU/invalid-alloca.ll
@@ -5,7 +5,7 @@
; RUN: llvm-as < %s | not opt -data-layout=A5 2>&1 | FileCheck -check-prefixes=COMMON,LLC %s
; AS: assembly parsed, but does not verify as correct!
-; COMMON: Allocation instruction pointer not in the stack address space!
+; COMMON: Allocation instruction pointer not in the dataLayout alloca address space!
; COMMON: %tmp = alloca i32
; LLC: error: input module is broken!
Index: test/Assembler/datalayout-alloca-addrspace-mismatch-2.ll
===================================================================
--- test/Assembler/datalayout-alloca-addrspace-mismatch-2.ll
+++ test/Assembler/datalayout-alloca-addrspace-mismatch-2.ll
@@ -2,7 +2,7 @@
target datalayout = "A1"
-; CHECK: Allocation instruction pointer not in the stack address space!
+; CHECK: Allocation instruction pointer not in the dataLayout alloca address space!
; CHECK-NEXT: %alloca_scalar_no_align = alloca i32, align 4, addrspace(2), !foo !0
define void @use_alloca() {
Index: test/Assembler/datalayout-alloca-addrspace-mismatch-1.ll
===================================================================
--- test/Assembler/datalayout-alloca-addrspace-mismatch-1.ll
+++ test/Assembler/datalayout-alloca-addrspace-mismatch-1.ll
@@ -2,7 +2,7 @@
target datalayout = "A1"
-; CHECK: Allocation instruction pointer not in the stack address space!
+; CHECK: Allocation instruction pointer not in the dataLayout alloca address space!
; CHECK-NEXT: %alloca_scalar_no_align = alloca i32, align 4, addrspace(2)
define void @use_alloca() {
Index: test/Assembler/datalayout-alloca-addrspace-mismatch-0.ll
===================================================================
--- test/Assembler/datalayout-alloca-addrspace-mismatch-0.ll
+++ test/Assembler/datalayout-alloca-addrspace-mismatch-0.ll
@@ -2,7 +2,7 @@
target datalayout = "A1"
-; CHECK: Allocation instruction pointer not in the stack address space!
+; CHECK: Allocation instruction pointer not in the dataLayout alloca address space!
; CHECK-NEXT: %alloca_scalar_no_align = alloca i32, addrspace(2)
define void @use_alloca() {
Index: lib/IR/Verifier.cpp
===================================================================
--- lib/IR/Verifier.cpp
+++ lib/IR/Verifier.cpp
@@ -3236,7 +3236,7 @@
PointerType *PTy = AI.getType();
// TODO: Relax this restriction?
Assert(PTy->getAddressSpace() == DL.getAllocaAddrSpace(),
- "Allocation instruction pointer not in the stack address space!",
+ "Allocation instruction pointer not in the dataLayout alloca address space!",
&AI);
Assert(AI.getAllocatedType()->isSized(&Visited),
"Cannot allocate unsized type", &AI);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42543.131462.patch
Type: text/x-patch
Size: 2869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180125/93af7fc0/attachment.bin>
More information about the llvm-commits
mailing list