|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 |
| 2 | +; RUN: llc < %s | FileCheck %s |
| 3 | + |
| 4 | +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" |
| 5 | +target triple = "x86_64-unknown-linux-gnu" |
| 6 | + |
| 7 | +%struct.bar = type { [5 x ptr] } |
| 8 | + |
| 9 | +@global = external dso_local global %struct.bar |
| 10 | + |
| 11 | +define i1 @foo(ptr %arg, i1 %arg1) { |
| 12 | +; CHECK-LABEL: foo: |
| 13 | +; CHECK: # %bb.0: # %bb |
| 14 | +; CHECK-NEXT: cmpq $global+1, %rdi |
| 15 | +; CHECK-NEXT: setne %al |
| 16 | +; CHECK-NEXT: andb %sil, %al |
| 17 | +; CHECK-NEXT: retq |
| 18 | +bb: |
| 19 | + #dbg_value(ptr @global, !3, !DIExpression(), !5) |
| 20 | + %icmp = icmp ne ptr %arg, getelementptr inbounds nuw (i8, ptr @global, i64 1) |
| 21 | + %select = select i1 %arg1, i1 %icmp, i1 false |
| 22 | + ret i1 %select |
| 23 | +} |
| 24 | + |
| 25 | +!llvm.dbg.cu = !{!0} |
| 26 | +!llvm.module.flags = !{!2} |
| 27 | + |
| 28 | +!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug) |
| 29 | +!1 = !DIFile(filename: "x.c", directory: "/proc/self/cwd") |
| 30 | +!2 = !{i32 2, !"Debug Info Version", i32 3} |
| 31 | +!3 = !DILocalVariable(name: "x", arg: 1, scope: !4, file: !1) |
| 32 | +!4 = distinct !DISubprogram(name: "x", scope: null, file: !1, spFlags: DISPFlagDefinition, unit: !0) |
| 33 | +!5 = !DILocation(line: 0, scope: !4) |
| 34 | + |
0 commit comments