1 ; RUN: opt < %s -S -passes=globalopt,instcombine | FileCheck %s
2 ;; check that global opt turns integers that only hold 0 or 1 into bools.
4 @G = internal addrspace(1) global i32 0
7 ; CHECK: global i1 false
10 store i32 0, ptr addrspace(1) @G
11 ; CHECK: store i1 false
16 store i32 1, ptr addrspace(1) @G
17 ; CHECK: store i1 true
23 %A = load i32, ptr addrspace(1) @G
24 %C = icmp slt i32 %A, 2