xref: /llvm-project/llvm/test/CodeGen/X86/compare-global.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: llc -o - %s | FileCheck %s
2
3target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
4target triple = "i686-pc-windows-msvc18.0.0"
5
6@foo = external global i8
7
8define void @f(ptr %c) {
9entry:
10  ; CHECK: cmpl $_foo, 4(%esp)
11  %cmp = icmp eq ptr %c, @foo
12  br i1 %cmp, label %if.then, label %if.end
13
14if.then:
15  tail call void @g()
16  br label %if.end
17
18if.end:
19  ret void
20}
21
22declare void @g()
23