1 ; RUN: llc < %s -mtriple=x86_64-pc-windows-msvc | FileCheck %s
3 ; Check how constant function pointer casts are handled.
5 declare void @unprototyped(...)
7 define i32 @call_unprototyped() {
8 call void bitcast (void (...)* @unprototyped to void ()*)()
12 ; CHECK-LABEL: call_unprototyped:
13 ; CHECK: callq unprototyped
14 ; CHECK: xorl %eax, %eax
17 declare void @escaped_cast()
19 define i32 @escape_it_with_cast(i8** %p) {
20 store i8* bitcast (void ()* @escaped_cast to i8*), i8** %p
24 declare void @dead_constant()
26 !llvm.module.flags = !{!0}
27 !0 = !{i32 2, !"cfguard", i32 1}
29 !dead_constant_root = !{!1}
30 !1 = !DITemplateValueParameter(name: "dead_constant", value: i8* bitcast (void ()* @dead_constant to i8*))
32 ; CHECK-LABEL: .section .gfids$y,"dr"
33 ; CHECK-NEXT: .symidx escaped_cast