source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 670 bytes
Line 
1; RUN: not llc -march=amdgcn < %s 2>&1 | FileCheck %s
2
3; Make sure that AMDGPUPromoteAlloca doesn't crash if the called
4; function is a constantexpr cast of a function.
5
6declare void @foo(float*) #0
7declare void @foo.varargs(...) #0
8
9; CHECK: error: unsupported call to function foo in crash_call_constexpr_cast
10define void @crash_call_constexpr_cast() #0 {
11  %alloca = alloca i32
12  call void bitcast (void (float*)* @foo to void (i32*)*)(i32* %alloca) #0
13  ret void
14}
15
16define void @crash_call_constexpr_cast_varargs() #0 {
17  %alloca = alloca i32
18  call void bitcast (void (...)* @foo.varargs to void (i32*)*)(i32* %alloca) #0
19  ret void
20}
21
22attributes #0 = { nounwind }
Note: See TracBrowser for help on using the repository browser.