aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/pr149841.ll
blob: c17a6172dee0cfc5d211d19085bd2e347e2c71db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s | FileCheck %s

target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.bar = type { [5 x ptr] }

@global = external dso_local global %struct.bar

define i1 @foo(ptr %arg, i1 %arg1) {
; CHECK-LABEL: foo:
; CHECK:       # %bb.0: # %bb
; CHECK-NEXT:    cmpq $global+1, %rdi
; CHECK-NEXT:    setne %al
; CHECK-NEXT:    andb %sil, %al
; CHECK-NEXT:    retq
bb:
  #dbg_value(ptr @global, !3, !DIExpression(), !5)
  %icmp = icmp ne ptr %arg, getelementptr inbounds nuw (i8, ptr @global, i64 1)
  %select = select i1 %arg1, i1 %icmp, i1 false
  ret i1 %select
}

!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!2}

!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)
!1 = !DIFile(filename: "x.c", directory: "/proc/self/cwd")
!2 = !{i32 2, !"Debug Info Version", i32 3}
!3 = !DILocalVariable(name: "x", arg: 1, scope: !4, file: !1)
!4 = distinct !DISubprogram(name: "x", scope: null, file: !1, spFlags: DISPFlagDefinition, unit: !0)
!5 = !DILocation(line: 0, scope: !4)