aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-reduce/reduce-global-variable-terminator-user.ll
blob: 09daed6bcb5c490d27a0609b3c350319f0238abb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=global-variables --test FileCheck --test-arg --check-prefixes=INTERESTING --test-arg %s --test-arg --input-file %s -o %t
; RUN: FileCheck --check-prefixes=RESULT %s < %t

; The global variable reduction was trying to delete use instructions
; of globals for some reason, and breaking the basic blocks that had
; global uses in the terminator

; RESULT-NOT: @zed
@zed = global i32 0

; INTERESTING: @bar
; RESULT: @bar
@bar = global i32 1

; RESULT: define ptr @zed_user() {
; RESULT-NEXT: ret ptr null
define ptr @zed_user() {
  ret ptr @zed
}