1 ; RUN: opt -passes=globalopt < %s -S -o - | FileCheck %s
3 ; When simplifying users of a global variable, the pass could incorrectly
4 ; return false if there were still some uses left, and no further optimizations
5 ; was done. This was caught by the pass return status check that is hidden
6 ; under EXPENSIVE_CHECKS.
8 @GV1 = internal unnamed_addr global i64 1, align 8
12 define void @test1() local_unnamed_addr {
14 ; CHECK-NEXT: ret void
16 %val = load atomic i8, ptr @GV1 acquire, align 8
20 define i64 @test2() local_unnamed_addr {
22 ; CHECK-NEXT: ret i64 1
24 %val = load atomic i64, ptr @GV1 acquire, align 8