1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc %s -o - | FileCheck %s
3 target triple = "i686-unknown-linux-gnu"
5 define noundef i32 @test(i1 %tobool1.not, i32 %sh.012, i1 %cmp, i64 %sh_prom, i64 %shl) {
7 ; CHECK: # %bb.0: # %entry
8 ; CHECK-NEXT: pushl %ebp
9 ; CHECK-NEXT: .cfi_def_cfa_offset 8
10 ; CHECK-NEXT: pushl %ebx
11 ; CHECK-NEXT: .cfi_def_cfa_offset 12
12 ; CHECK-NEXT: pushl %edi
13 ; CHECK-NEXT: .cfi_def_cfa_offset 16
14 ; CHECK-NEXT: pushl %esi
15 ; CHECK-NEXT: .cfi_def_cfa_offset 20
16 ; CHECK-NEXT: .cfi_offset %esi, -20
17 ; CHECK-NEXT: .cfi_offset %edi, -16
18 ; CHECK-NEXT: .cfi_offset %ebx, -12
19 ; CHECK-NEXT: .cfi_offset %ebp, -8
20 ; CHECK-NEXT: xorl %esi, %esi
21 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
22 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
23 ; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %edx
24 ; CHECK-NEXT: movb {{[0-9]+}}(%esp), %dh
25 ; CHECK-NEXT: xorl %edi, %edi
26 ; CHECK-NEXT: jmp .LBB0_1
27 ; CHECK-NEXT: .p2align 4
28 ; CHECK-NEXT: .LBB0_4: # %if.end
29 ; CHECK-NEXT: # in Loop: Header=BB0_1 Depth=1
30 ; CHECK-NEXT: orl %ecx, %ebx
31 ; CHECK-NEXT: orl %eax, %ebp
32 ; CHECK-NEXT: movl %ebx, %esi
33 ; CHECK-NEXT: movl %ebp, %edi
34 ; CHECK-NEXT: .LBB0_1: # %for.body
35 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
36 ; CHECK-NEXT: testb $1, %dh
37 ; CHECK-NEXT: je .LBB0_1
38 ; CHECK-NEXT: # %bb.2: # %if.end
39 ; CHECK-NEXT: # in Loop: Header=BB0_1 Depth=1
40 ; CHECK-NEXT: xorl %ebx, %ebx
41 ; CHECK-NEXT: testb $1, %dl
42 ; CHECK-NEXT: movl $0, %ebp
43 ; CHECK-NEXT: jne .LBB0_4
44 ; CHECK-NEXT: # %bb.3: # %if.end
45 ; CHECK-NEXT: # in Loop: Header=BB0_1 Depth=1
46 ; CHECK-NEXT: movl %esi, %ebx
47 ; CHECK-NEXT: movl %edi, %ebp
48 ; CHECK-NEXT: jmp .LBB0_4
52 for.body: ; preds = %for.inc, %entry
53 %bitmap.013 = phi i64 [ 0, %entry ], [ %bitmap.2, %for.inc ]
54 br i1 %tobool1.not, label %if.end, label %for.inc
56 if.end: ; preds = %for.body
57 %spec.select10 = select i1 %cmp, i64 0, i64 %bitmap.013
58 %shl6 = shl nuw i64 1, %sh_prom
59 %or = or i64 %shl, %spec.select10
60 tail call void @llvm.dbg.value(metadata i64 %or, metadata !17, metadata !DIExpression()), !dbg !21
63 for.inc: ; preds = %if.end, %for.body
64 %bitmap.2 = phi i64 [ %bitmap.013, %for.body ], [ %or, %if.end ]
65 %tobool.not = icmp eq i32 0, 0
69 declare void @llvm.dbg.value(metadata, metadata, metadata)
72 !llvm.module.flags = !{!16}
74 !0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, enums: !2)
75 !1 = !DIFile(filename: "test.c", directory: "test")
77 !16 = !{i32 2, !"Debug Info Version", i32 3}
78 !17 = !DILocalVariable(name: "bitmap", scope: !18, file: !1, line: 8, type: !20)
79 !18 = distinct !DISubprogram(name: "test", scope: !1, file: !1, line: 6, type: !19, scopeLine: 6, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)
80 !19 = !DISubroutineType(types: !2)
81 !20 = !DIBasicType(name: "long long", size: 64, encoding: DW_ATE_signed)
82 !21 = !DILocation(line: 0, scope: !18)