1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s 3 4 %struct.COMPOSITE = type { i8, i16, i16 } 5 %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } 6 %struct.FILE_POS = type { i8, i8, i16, i32 } 7 %struct.FIRST_UNION = type { %struct.FILE_POS } 8 %struct.FONT_INFO = type { %struct.metrics*, i8*, i16*, %struct.COMPOSITE*, i32, %struct.rec*, %struct.rec*, i16, i16, i16*, i8*, i8*, i16* } 9 %struct.FOURTH_UNION = type { %struct.STYLE } 10 %struct.GAP = type { i8, i8, i16 } 11 %struct.LIST = type { %struct.rec*, %struct.rec* } 12 %struct.SECOND_UNION = type { { i16, i8, i8 } } 13 %struct.STYLE = type { { %struct.GAP }, { %struct.GAP }, i16, i16, i32 } 14 %struct.THIRD_UNION = type { %struct.FILE*, [8 x i8] } 15 %struct.__sFILEX = type opaque 16 %struct.__sbuf = type { i8*, i32 } 17 %struct.head_type = type { [2 x %struct.LIST], %struct.FIRST_UNION, %struct.SECOND_UNION, %struct.THIRD_UNION, %struct.FOURTH_UNION, %struct.rec*, { %struct.rec* }, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, i32 } 18 %struct.metrics = type { i16, i16, i16, i16, i16 } 19 %struct.rec = type { %struct.head_type } 20 21define void @FontChange(i1 %foo) nounwind { 22; CHECK-LABEL: FontChange: 23; CHECK: # %bb.0: # %entry 24; CHECK-NEXT: testb $1, %dil 25; CHECK-NEXT: je .LBB0_9 26; CHECK-NEXT: .p2align 4, 0x90 27; CHECK-NEXT: .LBB0_1: # %bb366 28; CHECK-NEXT: # =>This Inner Loop Header: Depth=1 29; CHECK-NEXT: testb $1, %dil 30; CHECK-NEXT: jne .LBB0_1 31; CHECK-NEXT: # %bb.2: # %bb428 32; CHECK-NEXT: testb $1, %dil 33; CHECK-NEXT: je .LBB0_9 34; CHECK-NEXT: .p2align 4, 0x90 35; CHECK-NEXT: .LBB0_3: # %bb650 36; CHECK-NEXT: # =>This Inner Loop Header: Depth=1 37; CHECK-NEXT: cmpb $0, 0 38; CHECK-NEXT: je .LBB0_3 39; CHECK-NEXT: # %bb.4: # %bb662 40; CHECK-NEXT: movl 0, %eax 41; CHECK-NEXT: movl %eax, %ecx 42; CHECK-NEXT: andl $57344, %ecx # imm = 0xE000 43; CHECK-NEXT: cmpl $8192, %ecx # imm = 0x2000 44; CHECK-NEXT: jne .LBB0_9 45; CHECK-NEXT: # %bb.5: # %bb4884 46; CHECK-NEXT: andl $7168, %eax # imm = 0x1C00 47; CHECK-NEXT: cmpl $1024, %eax # imm = 0x400 48; CHECK-NEXT: jne .LBB0_9 49; CHECK-NEXT: # %bb.6: # %bb4932 50; CHECK-NEXT: testb $1, %dil 51; CHECK-NEXT: jne .LBB0_9 52; CHECK-NEXT: # %bb.7: # %bb4940 53; CHECK-NEXT: movl 0, %eax 54; CHECK-NEXT: cmpl $160, %eax 55; CHECK-NEXT: je .LBB0_9 56; CHECK-NEXT: # %bb.8: # %bb4940 57; CHECK-NEXT: cmpl $159, %eax 58; CHECK-NEXT: .LBB0_9: # %bb4897 59; CHECK-NEXT: retq 60entry: 61 br i1 %foo, label %bb298, label %bb49 62bb49: ; preds = %entry 63 ret void 64bb298: ; preds = %entry 65 br i1 %foo, label %bb304, label %bb366 66bb304: ; preds = %bb298 67 br i1 %foo, label %bb330, label %bb428 68bb330: ; preds = %bb366, %bb304 69 br label %bb366 70bb366: ; preds = %bb330, %bb298 71 br i1 %foo, label %bb330, label %bb428 72bb428: ; preds = %bb366, %bb304 73 br i1 %foo, label %bb650, label %bb433 74bb433: ; preds = %bb428 75 ret void 76bb650: ; preds = %bb650, %bb428 77 %tmp658 = load i8, i8* null, align 8 ; <i8> [#uses=1] 78 %tmp659 = icmp eq i8 %tmp658, 0 ; <i1> [#uses=1] 79 br i1 %tmp659, label %bb650, label %bb662 80bb662: ; preds = %bb650 81 br label %bb761 82bb688: ; preds = %bb662 83 ret void 84bb761: ; preds = %bb662 85 %tmp487248736542 = load i32, i32* null, align 4 ; <i32> [#uses=2] 86 %tmp487648776541 = and i32 %tmp487248736542, 57344 ; <i32> [#uses=1] 87 %tmp4881 = icmp eq i32 %tmp487648776541, 8192 ; <i1> [#uses=1] 88 br i1 %tmp4881, label %bb4884, label %bb4897 89bb4884: ; preds = %bb761 90 %tmp488948906540 = and i32 %tmp487248736542, 7168 ; <i32> [#uses=1] 91 %tmp4894 = icmp eq i32 %tmp488948906540, 1024 ; <i1> [#uses=1] 92 br i1 %tmp4894, label %bb4932, label %bb4897 93bb4897: ; preds = %bb4884, %bb761 94 ret void 95bb4932: ; preds = %bb4884 96 %tmp4933 = load i32, i32* null, align 4 ; <i32> [#uses=1] 97 br i1 %foo, label %bb5054, label %bb4940 98bb4940: ; preds = %bb4932 99 %tmp4943 = load i32, i32* null, align 4 ; <i32> [#uses=2] 100 switch i32 %tmp4933, label %bb5054 [ 101 i32 159, label %bb4970 102 i32 160, label %bb5002 103 ] 104bb4970: ; preds = %bb4940 105 %tmp49746536 = trunc i32 %tmp4943 to i16 ; <i16> [#uses=1] 106 %tmp49764977 = and i16 %tmp49746536, 4095 ; <i16> [#uses=1] 107 %mask498049814982 = zext i16 %tmp49764977 to i64 ; <i64> [#uses=1] 108 %tmp4984 = getelementptr %struct.FONT_INFO, %struct.FONT_INFO* null, i64 %mask498049814982, i32 5 ; <%struct.rec**> [#uses=1] 109 %tmp4985 = load %struct.rec*, %struct.rec** %tmp4984, align 8 ; <%struct.rec*> [#uses=1] 110 %tmp4988 = getelementptr %struct.rec, %struct.rec* %tmp4985, i64 0, i32 0, i32 3 ; <%struct.THIRD_UNION*> [#uses=1] 111 %tmp4991 = bitcast %struct.THIRD_UNION* %tmp4988 to i32* ; <i32*> [#uses=1] 112 %tmp4992 = load i32, i32* %tmp4991, align 8 ; <i32> [#uses=1] 113 %tmp49924993 = trunc i32 %tmp4992 to i16 ; <i16> [#uses=1] 114 %tmp4996 = add i16 %tmp49924993, 0 ; <i16> [#uses=1] 115 br label %bb5054 116bb5002: ; preds = %bb4940 117 %tmp50066537 = trunc i32 %tmp4943 to i16 ; <i16> [#uses=1] 118 %tmp50085009 = and i16 %tmp50066537, 4095 ; <i16> [#uses=1] 119 %mask501250135014 = zext i16 %tmp50085009 to i64 ; <i64> [#uses=1] 120 %tmp5016 = getelementptr %struct.FONT_INFO, %struct.FONT_INFO* null, i64 %mask501250135014, i32 5 ; <%struct.rec**> [#uses=1] 121 %tmp5017 = load %struct.rec*, %struct.rec** %tmp5016, align 8 ; <%struct.rec*> [#uses=1] 122 %tmp5020 = getelementptr %struct.rec, %struct.rec* %tmp5017, i64 0, i32 0, i32 3 ; <%struct.THIRD_UNION*> [#uses=1] 123 %tmp5023 = bitcast %struct.THIRD_UNION* %tmp5020 to i32* ; <i32*> [#uses=1] 124 %tmp5024 = load i32, i32* %tmp5023, align 8 ; <i32> [#uses=1] 125 %tmp50245025 = trunc i32 %tmp5024 to i16 ; <i16> [#uses=1] 126 %tmp5028 = sub i16 %tmp50245025, 0 ; <i16> [#uses=1] 127 br label %bb5054 128bb5054: ; preds = %bb5002, %bb4970, %bb4940, %bb4932 129 %flen.0.reg2mem.0 = phi i16 [ %tmp4996, %bb4970 ], [ %tmp5028, %bb5002 ], [ 0, %bb4932 ], [ undef, %bb4940 ] ; <i16> [#uses=0] 130 ret void 131} 132