xref: /llvm-project/llvm/test/CodeGen/X86/inalloca-regparm.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: llc -mtriple=i686-windows-msvc < %s -o /dev/null
2; RUN: not --crash llc -mtriple=x86_64-windows-msvc %s -o /dev/null 2>&1 | FileCheck %s
3
4; This will compile successfully on x86 but not x86_64, because %b will become a
5; register parameter.
6
7declare x86_thiscallcc i32 @f(i32 %a, ptr inalloca(i32) %b)
8define void @g() {
9  %b = alloca inalloca i32
10  store i32 2, ptr %b
11  call x86_thiscallcc i32 @f(i32 0, ptr inalloca(i32) %b)
12  ret void
13}
14
15; CHECK: cannot use inalloca attribute on a register parameter
16