brintos

brintos / llvm-project-archived public Read only

0
0
Text · 818 B · ca08844 Raw
37 lines · plain
1; RUN: llc < %s -mtriple=x86_64-pc-windows-msvc | FileCheck %s2; RUN: llc < %s -mtriple=x86_64-w64-windows-gnu | FileCheck %s3 4; Check how constant function pointer casts are handled.5 6declare void @unprototyped(...)7 8define i32 @call_unprototyped() {9  call void @unprototyped()10  ret i32 011}12 13; CHECK-LABEL: call_unprototyped:14; CHECK: callq unprototyped15; CHECK: xorl %eax, %eax16; CHECK: retq17 18declare void @escaped_cast()19 20define i32 @escape_it_with_cast(ptr %p) {21  store ptr @escaped_cast, ptr %p22  ret i32 023}24 25declare void @dead_constant()26 27!llvm.module.flags = !{!0}28!0 = !{i32 2, !"cfguard", i32 1}29 30!dead_constant_root = !{!1}31!1 = !DITemplateValueParameter(name: "dead_constant", value: ptr @dead_constant)32 33; CHECK-LABEL: .section .gfids$y,"dr"34; CHECK-NEXT:  .symidx escaped_cast35; CHECK-NOT:   .symidx36 37