1; RUN: llc < %s | FileCheck %s --check-prefix=CHECK-SMALL
2; RUN: llc --code-model=medium < %s | FileCheck %s --check-prefix=CHECK-MEDIUM
3
4target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
5target triple = "x86_64-unknown-linux-gnu"
6
7@a = external dso_local global i32, align 4
8
9declare void @f()
10
11define void @foo(i64 %b) {
12; CHECK-MEDIUM: cmpq  %rax, %rdi
13; CHECK-SMALL: cmpq $a, %rdi
14entry:
15  %cmp = icmp eq i64 %b, ptrtoint (i32* @a to i64)
16  br i1 %cmp, label %if.then, label %if.end
17
18if.then:                                          ; preds = %entry
19  tail call void @f()
20  br label %if.end
21
22if.end:                                           ; preds = %if.then, %entry
23  ret void
24}
25
26