File: nvvm-annotations-D120129.ll

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (35 lines) | stat: -rw-r--r-- 1,384 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
; RUN: llc < %s -mtriple=nvptx-unknown-unknown | FileCheck %s
; RUN: %if ptxas %{ llc < %s -mtriple=nvptx-unknown-unknown | %ptxas-verify %}
;
; NVPTXTargetLowering::getFunctionParamOptimizedAlign, which was introduces in
; D120129, contained a poorly designed assertion checking that a function with
; internal or private linkage is not a kernel. It relied on invariants that
; were not actually guaranteed, and that resulted in compiler crash with some
; CUDA versions (see discussion with @jdoerfert in D120129). This test contains
; metadata that caused compiler crash and a function with internal linkage
; which purpose is to let compiler run on path where the crash happened.
; Metadata was obtained from libdevice.10.bc shipped with cuda-11-0.


define internal i32 @foo() {
  ; CHECK-LABEL: .func (.param .b32 func_retval0) foo()
  ret i32 42
}

define i32 @bar() {
  ; CHECK-LABEL: .visible .func (.param .b32 func_retval0) bar()
  %x = call i32 @foo()
  ret i32 %x
}

!nvvmir.version = !{!0}
!nvvm.annotations = !{!1, !2, !1, !3, !3, !3, !3, !4, !4, !3}

!0 = !{i32 1, i32 4}
!1 = !{null, !"align", i32 8}
!2 = !{null, !"align", i32 8, !"align", i32 65544, !"align", i32 131080}
!3 = !{null, !"align", i32 16}
!4 = !{null, !"align", i32 16, !"align", i32 65552, !"align", i32 131088}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.unroll.count", i32 1}
!7 = distinct !{!7, !6}