File: evaluate-bitcast-4.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (29 lines) | stat: -rw-r--r-- 905 bytes parent folder | download | duplicates (14)
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
; PR48055. Check that this does not crash.
; RUN: opt -passes=globalopt %s -disable-output
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.g = type opaque
%struct.a = type { ptr }

@l = dso_local global i32 0, align 4
@h = external dso_local global %struct.g, align 1
@llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_bug48055.cc, ptr null }]

; Function Attrs: uwtable
define internal void @__cxx_global_var_init() {
entry:
  %vtable = load ptr, ptr @h, align 1
  %0 = load ptr, ptr %vtable, align 8
  %call = call i32 %0(ptr nonnull dereferenceable(8) @h)
  store i32 %call, ptr @l, align 4
  ret void
}

; Function Attrs: uwtable
define internal void @_GLOBAL__sub_I_bug48055.cc() {
entry:
  call void @__cxx_global_var_init()
  ret void
}