1*9880d681SAndroid Build Coastguard Worker; RUN: llc -verify-machineinstrs < %s 2*9880d681SAndroid Build Coastguard Worker; <rdar://problem/10270968> 3*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" 4*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-apple-macosx10.7.2" 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker%struct.optab = type { i32, [59 x %struct.anon.3] } 7*9880d681SAndroid Build Coastguard Worker%struct.anon.3 = type { i32, %struct.rtx_def* } 8*9880d681SAndroid Build Coastguard Worker%struct.rtx_def = type { [2 x i8], i8, i8, [1 x %union.rtunion_def] } 9*9880d681SAndroid Build Coastguard Worker%union.rtunion_def = type { i64 } 10*9880d681SAndroid Build Coastguard Worker%struct.insn_data = type { i8*, i8*, %struct.rtx_def* (%struct.rtx_def*, ...)*, %struct.insn_operand_data*, i8, i8, i8, i8 } 11*9880d681SAndroid Build Coastguard Worker%struct.insn_operand_data = type { i32 (%struct.rtx_def*, i32)*, i8*, [2 x i8], i8, i8 } 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker@optab_table = external global [49 x %struct.optab*], align 16 14*9880d681SAndroid Build Coastguard Worker@insn_data = external constant [0 x %struct.insn_data] 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Workerdefine %struct.rtx_def* @gen_add3_insn(%struct.rtx_def* %r0, %struct.rtx_def* %r1, %struct.rtx_def* %c) nounwind uwtable ssp { 17*9880d681SAndroid Build Coastguard Workerentry: 18*9880d681SAndroid Build Coastguard Worker %0 = bitcast %struct.rtx_def* %r0 to i32* 19*9880d681SAndroid Build Coastguard Worker %1 = load i32, i32* %0, align 8 20*9880d681SAndroid Build Coastguard Worker %2 = lshr i32 %1, 16 21*9880d681SAndroid Build Coastguard Worker %bf.clear = and i32 %2, 255 22*9880d681SAndroid Build Coastguard Worker %idxprom = sext i32 %bf.clear to i64 23*9880d681SAndroid Build Coastguard Worker %3 = load %struct.optab*, %struct.optab** getelementptr inbounds ([49 x %struct.optab*], [49 x %struct.optab*]* @optab_table, i32 0, i64 0), align 8 24*9880d681SAndroid Build Coastguard Worker %handlers = getelementptr inbounds %struct.optab, %struct.optab* %3, i32 0, i32 1 25*9880d681SAndroid Build Coastguard Worker %arrayidx = getelementptr inbounds [59 x %struct.anon.3], [59 x %struct.anon.3]* %handlers, i32 0, i64 %idxprom 26*9880d681SAndroid Build Coastguard Worker %insn_code = getelementptr inbounds %struct.anon.3, %struct.anon.3* %arrayidx, i32 0, i32 0 27*9880d681SAndroid Build Coastguard Worker %4 = load i32, i32* %insn_code, align 4 28*9880d681SAndroid Build Coastguard Worker %cmp = icmp eq i32 %4, 1317 29*9880d681SAndroid Build Coastguard Worker br i1 %cmp, label %if.then, label %lor.lhs.false 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Workerlor.lhs.false: ; preds = %entry 32*9880d681SAndroid Build Coastguard Worker %idxprom1 = sext i32 %4 to i64 33*9880d681SAndroid Build Coastguard Worker %arrayidx2 = getelementptr inbounds [0 x %struct.insn_data], [0 x %struct.insn_data]* @insn_data, i32 0, i64 %idxprom1 34*9880d681SAndroid Build Coastguard Worker %operand = getelementptr inbounds %struct.insn_data, %struct.insn_data* %arrayidx2, i32 0, i32 3 35*9880d681SAndroid Build Coastguard Worker %5 = load %struct.insn_operand_data*, %struct.insn_operand_data** %operand, align 8 36*9880d681SAndroid Build Coastguard Worker %arrayidx3 = getelementptr inbounds %struct.insn_operand_data, %struct.insn_operand_data* %5, i64 0 37*9880d681SAndroid Build Coastguard Worker %predicate = getelementptr inbounds %struct.insn_operand_data, %struct.insn_operand_data* %arrayidx3, i32 0, i32 0 38*9880d681SAndroid Build Coastguard Worker %6 = load i32 (%struct.rtx_def*, i32)*, i32 (%struct.rtx_def*, i32)** %predicate, align 8 39*9880d681SAndroid Build Coastguard Worker %idxprom4 = sext i32 %4 to i64 40*9880d681SAndroid Build Coastguard Worker %arrayidx5 = getelementptr inbounds [0 x %struct.insn_data], [0 x %struct.insn_data]* @insn_data, i32 0, i64 %idxprom4 41*9880d681SAndroid Build Coastguard Worker %operand6 = getelementptr inbounds %struct.insn_data, %struct.insn_data* %arrayidx5, i32 0, i32 3 42*9880d681SAndroid Build Coastguard Worker %7 = load %struct.insn_operand_data*, %struct.insn_operand_data** %operand6, align 8 43*9880d681SAndroid Build Coastguard Worker %arrayidx7 = getelementptr inbounds %struct.insn_operand_data, %struct.insn_operand_data* %7, i64 0 44*9880d681SAndroid Build Coastguard Worker %8 = bitcast %struct.insn_operand_data* %arrayidx7 to i8* 45*9880d681SAndroid Build Coastguard Worker %bf.field.offs = getelementptr i8, i8* %8, i32 16 46*9880d681SAndroid Build Coastguard Worker %9 = bitcast i8* %bf.field.offs to i32* 47*9880d681SAndroid Build Coastguard Worker %10 = load i32, i32* %9, align 8 48*9880d681SAndroid Build Coastguard Worker %bf.clear8 = and i32 %10, 65535 49*9880d681SAndroid Build Coastguard Worker %call = tail call i32 %6(%struct.rtx_def* %r0, i32 %bf.clear8) 50*9880d681SAndroid Build Coastguard Worker %tobool = icmp ne i32 %call, 0 51*9880d681SAndroid Build Coastguard Worker br i1 %tobool, label %lor.lhs.false9, label %if.then 52*9880d681SAndroid Build Coastguard Worker 53*9880d681SAndroid Build Coastguard Workerlor.lhs.false9: ; preds = %lor.lhs.false 54*9880d681SAndroid Build Coastguard Worker %idxprom10 = sext i32 %4 to i64 55*9880d681SAndroid Build Coastguard Worker %arrayidx11 = getelementptr inbounds [0 x %struct.insn_data], [0 x %struct.insn_data]* @insn_data, i32 0, i64 %idxprom10 56*9880d681SAndroid Build Coastguard Worker %operand12 = getelementptr inbounds %struct.insn_data, %struct.insn_data* %arrayidx11, i32 0, i32 3 57*9880d681SAndroid Build Coastguard Worker %11 = load %struct.insn_operand_data*, %struct.insn_operand_data** %operand12, align 8 58*9880d681SAndroid Build Coastguard Worker %arrayidx13 = getelementptr inbounds %struct.insn_operand_data, %struct.insn_operand_data* %11, i64 1 59*9880d681SAndroid Build Coastguard Worker %predicate14 = getelementptr inbounds %struct.insn_operand_data, %struct.insn_operand_data* %arrayidx13, i32 0, i32 0 60*9880d681SAndroid Build Coastguard Worker %12 = load i32 (%struct.rtx_def*, i32)*, i32 (%struct.rtx_def*, i32)** %predicate14, align 8 61*9880d681SAndroid Build Coastguard Worker %idxprom15 = sext i32 %4 to i64 62*9880d681SAndroid Build Coastguard Worker %arrayidx16 = getelementptr inbounds [0 x %struct.insn_data], [0 x %struct.insn_data]* @insn_data, i32 0, i64 %idxprom15 63*9880d681SAndroid Build Coastguard Worker %operand17 = getelementptr inbounds %struct.insn_data, %struct.insn_data* %arrayidx16, i32 0, i32 3 64*9880d681SAndroid Build Coastguard Worker %13 = load %struct.insn_operand_data*, %struct.insn_operand_data** %operand17, align 8 65*9880d681SAndroid Build Coastguard Worker %arrayidx18 = getelementptr inbounds %struct.insn_operand_data, %struct.insn_operand_data* %13, i64 1 66*9880d681SAndroid Build Coastguard Worker %14 = bitcast %struct.insn_operand_data* %arrayidx18 to i8* 67*9880d681SAndroid Build Coastguard Worker %bf.field.offs19 = getelementptr i8, i8* %14, i32 16 68*9880d681SAndroid Build Coastguard Worker %15 = bitcast i8* %bf.field.offs19 to i32* 69*9880d681SAndroid Build Coastguard Worker %16 = load i32, i32* %15, align 8 70*9880d681SAndroid Build Coastguard Worker %bf.clear20 = and i32 %16, 65535 71*9880d681SAndroid Build Coastguard Worker %call21 = tail call i32 %12(%struct.rtx_def* %r1, i32 %bf.clear20) 72*9880d681SAndroid Build Coastguard Worker %tobool22 = icmp ne i32 %call21, 0 73*9880d681SAndroid Build Coastguard Worker br i1 %tobool22, label %lor.lhs.false23, label %if.then 74*9880d681SAndroid Build Coastguard Worker 75*9880d681SAndroid Build Coastguard Workerlor.lhs.false23: ; preds = %lor.lhs.false9 76*9880d681SAndroid Build Coastguard Worker %idxprom24 = sext i32 %4 to i64 77*9880d681SAndroid Build Coastguard Worker %arrayidx25 = getelementptr inbounds [0 x %struct.insn_data], [0 x %struct.insn_data]* @insn_data, i32 0, i64 %idxprom24 78*9880d681SAndroid Build Coastguard Worker %operand26 = getelementptr inbounds %struct.insn_data, %struct.insn_data* %arrayidx25, i32 0, i32 3 79*9880d681SAndroid Build Coastguard Worker %17 = load %struct.insn_operand_data*, %struct.insn_operand_data** %operand26, align 8 80*9880d681SAndroid Build Coastguard Worker %arrayidx27 = getelementptr inbounds %struct.insn_operand_data, %struct.insn_operand_data* %17, i64 2 81*9880d681SAndroid Build Coastguard Worker %predicate28 = getelementptr inbounds %struct.insn_operand_data, %struct.insn_operand_data* %arrayidx27, i32 0, i32 0 82*9880d681SAndroid Build Coastguard Worker %18 = load i32 (%struct.rtx_def*, i32)*, i32 (%struct.rtx_def*, i32)** %predicate28, align 8 83*9880d681SAndroid Build Coastguard Worker %idxprom29 = sext i32 %4 to i64 84*9880d681SAndroid Build Coastguard Worker %arrayidx30 = getelementptr inbounds [0 x %struct.insn_data], [0 x %struct.insn_data]* @insn_data, i32 0, i64 %idxprom29 85*9880d681SAndroid Build Coastguard Worker %operand31 = getelementptr inbounds %struct.insn_data, %struct.insn_data* %arrayidx30, i32 0, i32 3 86*9880d681SAndroid Build Coastguard Worker %19 = load %struct.insn_operand_data*, %struct.insn_operand_data** %operand31, align 8 87*9880d681SAndroid Build Coastguard Worker %arrayidx32 = getelementptr inbounds %struct.insn_operand_data, %struct.insn_operand_data* %19, i64 2 88*9880d681SAndroid Build Coastguard Worker %20 = bitcast %struct.insn_operand_data* %arrayidx32 to i8* 89*9880d681SAndroid Build Coastguard Worker %bf.field.offs33 = getelementptr i8, i8* %20, i32 16 90*9880d681SAndroid Build Coastguard Worker %21 = bitcast i8* %bf.field.offs33 to i32* 91*9880d681SAndroid Build Coastguard Worker %22 = load i32, i32* %21, align 8 92*9880d681SAndroid Build Coastguard Worker %bf.clear34 = and i32 %22, 65535 93*9880d681SAndroid Build Coastguard Worker %call35 = tail call i32 %18(%struct.rtx_def* %c, i32 %bf.clear34) 94*9880d681SAndroid Build Coastguard Worker %tobool36 = icmp ne i32 %call35, 0 95*9880d681SAndroid Build Coastguard Worker br i1 %tobool36, label %if.end, label %if.then 96*9880d681SAndroid Build Coastguard Worker 97*9880d681SAndroid Build Coastguard Workerif.then: ; preds = %lor.lhs.false23, %lor.lhs.false9, %lor.lhs.false, %entry 98*9880d681SAndroid Build Coastguard Worker br label %return 99*9880d681SAndroid Build Coastguard Worker 100*9880d681SAndroid Build Coastguard Workerif.end: ; preds = %lor.lhs.false23 101*9880d681SAndroid Build Coastguard Worker %idxprom37 = sext i32 %4 to i64 102*9880d681SAndroid Build Coastguard Worker %arrayidx38 = getelementptr inbounds [0 x %struct.insn_data], [0 x %struct.insn_data]* @insn_data, i32 0, i64 %idxprom37 103*9880d681SAndroid Build Coastguard Worker %genfun = getelementptr inbounds %struct.insn_data, %struct.insn_data* %arrayidx38, i32 0, i32 2 104*9880d681SAndroid Build Coastguard Worker %23 = load %struct.rtx_def* (%struct.rtx_def*, ...)*, %struct.rtx_def* (%struct.rtx_def*, ...)** %genfun, align 8 105*9880d681SAndroid Build Coastguard Worker %call39 = tail call %struct.rtx_def* (%struct.rtx_def*, ...) %23(%struct.rtx_def* %r0, %struct.rtx_def* %r1, %struct.rtx_def* %c) 106*9880d681SAndroid Build Coastguard Worker br label %return 107*9880d681SAndroid Build Coastguard Worker 108*9880d681SAndroid Build Coastguard Workerreturn: ; preds = %if.end, %if.then 109*9880d681SAndroid Build Coastguard Worker %24 = phi %struct.rtx_def* [ %call39, %if.end ], [ null, %if.then ] 110*9880d681SAndroid Build Coastguard Worker ret %struct.rtx_def* %24 111*9880d681SAndroid Build Coastguard Worker} 112