llvm/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/global_regex.ll.expected

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals --global-value-regex "OnlyFoo"
; RUN: opt < %s -S | FileCheck %s

@Bar = global i32 0
@OnlyFoo = global i32 1
@Baz = global i32 2

;.
; CHECK: @OnlyFoo = global i32 1
;.
define i32 @t() {
; CHECK-LABEL: @t(
; CHECK-NEXT:    [[V1:%.*]] = load i32, ptr @Bar, align 4
; CHECK-NEXT:    [[V2:%.*]] = load i32, ptr @OnlyFoo, align 4
; CHECK-NEXT:    [[V3:%.*]] = load i32, ptr @Baz, align 4
; CHECK-NEXT:    [[A1:%.*]] = add i32 [[V1]], [[V2]]
; CHECK-NEXT:    [[A2:%.*]] = add i32 [[A1]], [[V3]]
; CHECK-NEXT:    ret i32 [[A2]]
;
  %v1 = load i32, ptr @Bar
  %v2 = load i32, ptr @OnlyFoo
  %v3 = load i32, ptr @Baz
  %a1 = add i32 %v1, %v2
  %a2 = add i32 %a1, %v3
  ret i32 %a2
}