mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-04 04:19:25 +00:00
Roundtrip the inalloca bit on allocas through bitcode
This was an oversight in the original support. As it is, I stuffed this bit into the alignment. The alignment is stored in log2 form, so it doesn't need more than 5 bits, given that Value::MaximumAlignment is 1 << 29. Reviewers: nicholas Differential Revision: http://reviews.llvm.org/D3943 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213118 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
18
test/Bitcode/inalloca.ll
Normal file
18
test/Bitcode/inalloca.ll
Normal file
@@ -0,0 +1,18 @@
|
||||
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
||||
|
||||
; inalloca should roundtrip.
|
||||
|
||||
define void @foo(i32* inalloca %args) {
|
||||
ret void
|
||||
}
|
||||
; CHECK-LABEL: define void @foo(i32* inalloca %args)
|
||||
|
||||
define void @bar() {
|
||||
; Use the maximum alignment, since we stuff our bit with alignment.
|
||||
%args = alloca inalloca i32, align 536870912
|
||||
call void @foo(i32* inalloca %args)
|
||||
ret void
|
||||
}
|
||||
; CHECK-LABEL: define void @bar() {
|
||||
; CHECK: %args = alloca inalloca i32, align 536870912
|
||||
; CHECK: call void @foo(i32* inalloca %args)
|
Reference in New Issue
Block a user