mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 03:26:06 +00:00

Address spaces equal or larger than 1 << 24 don't fit and produce an assertion during debug builds, or worse in release. This causes an error to be reported during parsing instead. Differential Revision: https://reviews.llvm.org/D139528
9 lines
257 B
LLVM
9 lines
257 B
LLVM
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
|
|
; Check that parser rejects address spaces that are too large to fit in the 24 bits
|
|
|
|
define void @f() {
|
|
; CHECK: invalid address space, must be a 24-bit integer
|
|
%y = alloca i32, addrspace(16777216)
|
|
ret void
|
|
}
|