Index: lib/CodeGen/RegisterScavenging.cpp =================================================================== --- lib/CodeGen/RegisterScavenging.cpp +++ lib/CodeGen/RegisterScavenging.cpp @@ -415,11 +415,17 @@ // Consider all allocatable registers in the register class initially BitVector Candidates = TRI->getAllocatableSet(MF, RC); - // Exclude all the registers being used by the instruction. + // Exclude all the registers being used by the instruction, and all of their + // sub- and super-registers. for (const MachineOperand &MO : MI.operands()) { if (MO.isReg() && MO.getReg() != 0 && !(MO.isUse() && MO.isUndef()) && - !TargetRegisterInfo::isVirtualRegister(MO.getReg())) + !TargetRegisterInfo::isVirtualRegister(MO.getReg())) { Candidates.reset(MO.getReg()); + for (MCSuperRegIterator Super(MO.getReg(), TRI); Super.isValid(); ++Super) + Candidates.reset(*Super); + for (MCSubRegIterator Sub(MO.getReg(), TRI); Sub.isValid(); ++Sub) + Candidates.reset(*Sub); + } } // Try to find a register that's unused if there is one, as then we won't Index: test/CodeGen/AArch64/scavenge-sub-registers.ll =================================================================== --- /dev/null +++ test/CodeGen/AArch64/scavenge-sub-registers.ll @@ -0,0 +1,364 @@ +; RUN: llc < %s -O0 | FileCheck %s + +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" +target triple = "aarch64-arm-none-eabi" + +%struct.S3 = type { i64, i8 } +%struct.S1 = type { i32, i32, i32 } +%struct.S4 = type { %struct.S1, i32, i32, i32, i32, i32 } +%struct.S2 = type { i32 } + +@k = common global %struct.S3 zeroinitializer, align 8 +@t2 = common global %struct.S1 zeroinitializer, align 4 +@t = common global %struct.S1* null, align 8 +@main.t12 = private unnamed_addr constant [216 x %struct.S1**] [%struct.S1** @t, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null, %struct.S1** null], align 8 +@h = common global i32 0, align 4 +@q = common global i32 0, align 4 +@f = common global i32 0, align 4 +@g = common global i32 0, align 4 +@y = common global i32 0, align 4 +@i = common global i32 0, align 4 +@a = common global i32 0, align 4 +@r = common global i32 0, align 4 +@e = common global i32 0, align 4 +@s = common global i32 0, align 4 +@j = common global i32 0, align 4 +@v = common global i32 0, align 4 +@m = common global i32 0, align 4 +@w = common global i32 0, align 4 +@o = common global i32 0, align 4 +@x = common global i32 0, align 4 +@z = common global i32 0, align 4 +@l = common global i32 0, align 4 +@n = common global i32 0, align 4 +@p = common global i32 0, align 4 +@u = common global i32 0, align 4 +@t3 = common global i32 0, align 4 +@t4 = common global %struct.S4 zeroinitializer, align 4 +@t6 = common global %struct.S2 zeroinitializer, align 4 +@d = common global i32 0, align 4 +@t7 = common global i32 0, align 4 +@t5 = common global %struct.S4 zeroinitializer, align 4 +@c = common global i32 0, align 4 +@t1 = common global i32 0, align 4 +@b = common global i32 0, align 4 +@.str = private unnamed_addr constant [15 x i8] c"checksum = %X\0A\00", align 1 + +define [2 x i64] @fn1() { +entry: + %retval = alloca %struct.S3, align 8 + %0 = bitcast %struct.S3* %retval to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.S3* @k to i8*), i64 16, i32 8, i1 false) + %1 = bitcast %struct.S3* %retval to [2 x i64]* + %2 = load [2 x i64], [2 x i64]* %1, align 8 + ret [2 x i64] %2 +} + +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) + +define [2 x i64] @fn2() { +entry: + %retval = alloca %struct.S1, align 4 + %tmp = alloca [2 x i64], align 8 + %0 = bitcast %struct.S1* %retval to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast (%struct.S1* @t2 to i8*), i64 12, i32 4, i1 false) + %1 = bitcast [2 x i64]* %tmp to i8* + %2 = bitcast %struct.S1* %retval to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %2, i64 12, i32 4, i1 false) + %3 = load [2 x i64], [2 x i64]* %tmp, align 8 + ret [2 x i64] %3 +} + +define i32 @main() "no-frame-pointer-elim"="true" { +entry: + %retval = alloca i32, align 4 + %t8 = alloca %struct.S3, align 8 + %t9 = alloca i32, align 4 + %t10 = alloca [59 x i32], align 4 + %t11 = alloca i8, align 1 + %t12 = alloca [216 x %struct.S1**], align 8 + %t13 = alloca [5 x [45 x i32*]], align 8 + %t14 = alloca i8, align 1 + %agg.tmp.ensured = alloca %struct.S4, align 4 + %agg.tmp.ensured94 = alloca %struct.S2, align 4 + %t15 = alloca i32, align 4 + %t16 = alloca i32*, align 8 + %t17 = alloca i32*, align 8 + %t18 = alloca i32, align 4 + %agg.tmp.ensured98 = alloca %struct.S4, align 4 + %coerce = alloca %struct.S3, align 8 + %t19 = alloca %struct.S1, align 4 + %coerce110 = alloca %struct.S1, align 4 + %tmp = alloca [2 x i64], align 8 + store i32 0, i32* %retval, align 4 + store i8 5, i8* %t11, align 1 +; CHECK: mov w[[CONST_REG:[0-9]+]], #5 +; CHECK-NOT: strb w[[CONST_REG]], [x[[CONST_REG]], # + %0 = bitcast [216 x %struct.S1**]* %t12 to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast ([216 x %struct.S1**]* @main.t12 to i8*), i64 1728, i32 8, i1 false) + %arrayinit.begin = getelementptr inbounds [5 x [45 x i32*]], [5 x [45 x i32*]]* %t13, i64 0, i64 0 + %arrayinit.begin1 = getelementptr inbounds [45 x i32*], [45 x i32*]* %arrayinit.begin, i64 0, i64 0 + store i32* null, i32** %arrayinit.begin1, align 8 + %arrayinit.element = getelementptr inbounds i32*, i32** %arrayinit.begin1, i64 1 + store i32* null, i32** %arrayinit.element, align 8 + %arrayinit.element2 = getelementptr inbounds i32*, i32** %arrayinit.element, i64 1 + store i32* null, i32** %arrayinit.element2, align 8 + %arrayinit.element3 = getelementptr inbounds i32*, i32** %arrayinit.element2, i64 1 + store i32* null, i32** %arrayinit.element3, align 8 + %arrayinit.element4 = getelementptr inbounds i32*, i32** %arrayinit.element3, i64 1 + store i32* null, i32** %arrayinit.element4, align 8 + %arrayinit.element5 = getelementptr inbounds i32*, i32** %arrayinit.element4, i64 1 + store i32* null, i32** %arrayinit.element5, align 8 + %arrayinit.element6 = getelementptr inbounds i32*, i32** %arrayinit.element5, i64 1 + store i32* null, i32** %arrayinit.element6, align 8 + %arrayinit.element7 = getelementptr inbounds i32*, i32** %arrayinit.element6, i64 1 + store i32* null, i32** %arrayinit.element7, align 8 + %arrayinit.element8 = getelementptr inbounds i32*, i32** %arrayinit.element7, i64 1 + store i32* null, i32** %arrayinit.element8, align 8 + %arrayinit.element9 = getelementptr inbounds i32*, i32** %arrayinit.element8, i64 1 + store i32* null, i32** %arrayinit.element9, align 8 + %arrayinit.element10 = getelementptr inbounds i32*, i32** %arrayinit.element9, i64 1 + store i32* @h, i32** %arrayinit.element10, align 8 + %arrayinit.element11 = getelementptr inbounds i32*, i32** %arrayinit.element10, i64 1 + store i32* null, i32** %arrayinit.element11, align 8 + %arrayinit.element12 = getelementptr inbounds i32*, i32** %arrayinit.element11, i64 1 + store i32* @q, i32** %arrayinit.element12, align 8 + %arrayinit.element13 = getelementptr inbounds i32*, i32** %arrayinit.element12, i64 1 + store i32* null, i32** %arrayinit.element13, align 8 + %arrayinit.element14 = getelementptr inbounds i32*, i32** %arrayinit.element13, i64 1 + store i32* null, i32** %arrayinit.element14, align 8 + %arrayinit.element15 = getelementptr inbounds i32*, i32** %arrayinit.element14, i64 1 + store i32* null, i32** %arrayinit.element15, align 8 + %arrayinit.element16 = getelementptr inbounds i32*, i32** %arrayinit.element15, i64 1 + store i32* null, i32** %arrayinit.element16, align 8 + %arrayinit.element17 = getelementptr inbounds i32*, i32** %arrayinit.element16, i64 1 + store i32* null, i32** %arrayinit.element17, align 8 + %arrayinit.element18 = getelementptr inbounds i32*, i32** %arrayinit.element17, i64 1 + store i32* null, i32** %arrayinit.element18, align 8 + %arrayinit.element19 = getelementptr inbounds i32*, i32** %arrayinit.element18, i64 1 + store i32* null, i32** %arrayinit.element19, align 8 + %arrayinit.element20 = getelementptr inbounds i32*, i32** %arrayinit.element19, i64 1 + store i32* null, i32** %arrayinit.element20, align 8 + %arrayinit.element21 = getelementptr inbounds i32*, i32** %arrayinit.element20, i64 1 + store i32* null, i32** %arrayinit.element21, align 8 + %arrayinit.element22 = getelementptr inbounds i32*, i32** %arrayinit.element21, i64 1 + store i32* null, i32** %arrayinit.element22, align 8 + %arrayinit.element23 = getelementptr inbounds i32*, i32** %arrayinit.element22, i64 1 + store i32* @f, i32** %arrayinit.element23, align 8 + %arrayinit.element24 = getelementptr inbounds i32*, i32** %arrayinit.element23, i64 1 + store i32* @g, i32** %arrayinit.element24, align 8 + %arrayinit.element25 = getelementptr inbounds i32*, i32** %arrayinit.element24, i64 1 + store i32* @y, i32** %arrayinit.element25, align 8 + %arrayinit.element26 = getelementptr inbounds i32*, i32** %arrayinit.element25, i64 1 + store i32* @i, i32** %arrayinit.element26, align 8 + %arrayinit.element27 = getelementptr inbounds i32*, i32** %arrayinit.element26, i64 1 + store i32* @a, i32** %arrayinit.element27, align 8 + %arrayinit.element28 = getelementptr inbounds i32*, i32** %arrayinit.element27, i64 1 + store i32* @y, i32** %arrayinit.element28, align 8 + %arrayinit.element29 = getelementptr inbounds i32*, i32** %arrayinit.element28, i64 1 + store i32* @r, i32** %arrayinit.element29, align 8 + %arrayinit.element30 = getelementptr inbounds i32*, i32** %arrayinit.element29, i64 1 + store i32* @e, i32** %arrayinit.element30, align 8 + %arrayinit.element31 = getelementptr inbounds i32*, i32** %arrayinit.element30, i64 1 + store i32* @r, i32** %arrayinit.element31, align 8 + %arrayinit.element32 = getelementptr inbounds i32*, i32** %arrayinit.element31, i64 1 + store i32* @s, i32** %arrayinit.element32, align 8 + %arrayinit.element33 = getelementptr inbounds i32*, i32** %arrayinit.element32, i64 1 + store i32* null, i32** %arrayinit.element33, align 8 + %arrayinit.element34 = getelementptr inbounds i32*, i32** %arrayinit.element33, i64 1 + store i32* @j, i32** %arrayinit.element34, align 8 + %arrayinit.element35 = getelementptr inbounds i32*, i32** %arrayinit.element34, i64 1 + store i32* @v, i32** %arrayinit.element35, align 8 + %arrayinit.element36 = getelementptr inbounds i32*, i32** %arrayinit.element35, i64 1 + store i32* @r, i32** %arrayinit.element36, align 8 + %arrayinit.element37 = getelementptr inbounds i32*, i32** %arrayinit.element36, i64 1 + store i32* null, i32** %arrayinit.element37, align 8 + %arrayinit.element38 = getelementptr inbounds i32*, i32** %arrayinit.element37, i64 1 + store i32* @y, i32** %arrayinit.element38, align 8 + %arrayinit.element39 = getelementptr inbounds i32*, i32** %arrayinit.element38, i64 1 + store i32* @m, i32** %arrayinit.element39, align 8 + %arrayinit.element40 = getelementptr inbounds i32*, i32** %arrayinit.element39, i64 1 + store i32* null, i32** %arrayinit.element40, align 8 + %arrayinit.element41 = getelementptr inbounds i32*, i32** %arrayinit.element40, i64 1 + store i32* @w, i32** %arrayinit.element41, align 8 + %arrayinit.element42 = getelementptr inbounds i32*, i32** %arrayinit.element41, i64 1 + store i32* @w, i32** %arrayinit.element42, align 8 + %arrayinit.element43 = getelementptr inbounds i32*, i32** %arrayinit.element42, i64 1 + store i32* @f, i32** %arrayinit.element43, align 8 + %arrayinit.element44 = getelementptr inbounds i32*, i32** %arrayinit.element43, i64 1 + store i32* @a, i32** %arrayinit.element44, align 8 + %arrayinit.element45 = getelementptr inbounds [45 x i32*], [45 x i32*]* %arrayinit.begin, i64 1 + %arrayinit.begin46 = getelementptr inbounds [45 x i32*], [45 x i32*]* %arrayinit.element45, i64 0, i64 0 + store i32* @o, i32** %arrayinit.begin46, align 8 + %arrayinit.element47 = getelementptr inbounds i32*, i32** %arrayinit.begin46, i64 1 + store i32* @x, i32** %arrayinit.element47, align 8 + %arrayinit.element48 = getelementptr inbounds i32*, i32** %arrayinit.element47, i64 1 + store i32* null, i32** %arrayinit.element48, align 8 + %arrayinit.element49 = getelementptr inbounds i32*, i32** %arrayinit.element48, i64 1 + store i32* null, i32** %arrayinit.element49, align 8 + %arrayinit.element50 = getelementptr inbounds i32*, i32** %arrayinit.element49, i64 1 + store i32* @z, i32** %arrayinit.element50, align 8 + %arrayinit.element51 = getelementptr inbounds i32*, i32** %arrayinit.element50, i64 1 + store i32* @w, i32** %arrayinit.element51, align 8 + %arrayinit.element52 = getelementptr inbounds i32*, i32** %arrayinit.element51, i64 1 + store i32* @w, i32** %arrayinit.element52, align 8 + %arrayinit.element53 = getelementptr inbounds i32*, i32** %arrayinit.element52, i64 1 + store i32* @l, i32** %arrayinit.element53, align 8 + %arrayinit.element54 = getelementptr inbounds i32*, i32** %arrayinit.element53, i64 1 + store i32* @x, i32** %arrayinit.element54, align 8 + %arrayinit.element55 = getelementptr inbounds i32*, i32** %arrayinit.element54, i64 1 + store i32* @s, i32** %arrayinit.element55, align 8 + %arrayinit.element56 = getelementptr inbounds i32*, i32** %arrayinit.element55, i64 1 + store i32* null, i32** %arrayinit.element56, align 8 + %arrayinit.element57 = getelementptr inbounds i32*, i32** %arrayinit.element56, i64 1 + store i32* @o, i32** %arrayinit.element57, align 8 + %arrayinit.element58 = getelementptr inbounds i32*, i32** %arrayinit.element57, i64 1 + store i32* @a, i32** %arrayinit.element58, align 8 + %arrayinit.element59 = getelementptr inbounds i32*, i32** %arrayinit.element58, i64 1 + store i32* @a, i32** %arrayinit.element59, align 8 + %arrayinit.element60 = getelementptr inbounds i32*, i32** %arrayinit.element59, i64 1 + store i32* @o, i32** %arrayinit.element60, align 8 + %arrayinit.element61 = getelementptr inbounds i32*, i32** %arrayinit.element60, i64 1 + store i32* @o, i32** %arrayinit.element61, align 8 + %arrayinit.element62 = getelementptr inbounds i32*, i32** %arrayinit.element61, i64 1 + store i32* @z, i32** %arrayinit.element62, align 8 + %arrayinit.element63 = getelementptr inbounds i32*, i32** %arrayinit.element62, i64 1 + store i32* @r, i32** %arrayinit.element63, align 8 + %arrayinit.element64 = getelementptr inbounds i32*, i32** %arrayinit.element63, i64 1 + store i32* null, i32** %arrayinit.element64, align 8 + %arrayinit.element65 = getelementptr inbounds i32*, i32** %arrayinit.element64, i64 1 + store i32* @n, i32** %arrayinit.element65, align 8 + %arrayinit.element66 = getelementptr inbounds i32*, i32** %arrayinit.element65, i64 1 + store i32* @p, i32** %arrayinit.element66, align 8 + %arrayinit.element67 = getelementptr inbounds i32*, i32** %arrayinit.element66, i64 1 + store i32* null, i32** %arrayinit.element67, align 8 + %arrayinit.element68 = getelementptr inbounds i32*, i32** %arrayinit.element67, i64 1 + store i32* @o, i32** %arrayinit.element68, align 8 + %arrayinit.element69 = getelementptr inbounds i32*, i32** %arrayinit.element68, i64 1 + store i32* @l, i32** %arrayinit.element69, align 8 + %arrayinit.element70 = getelementptr inbounds i32*, i32** %arrayinit.element69, i64 1 + store i32* @p, i32** %arrayinit.element70, align 8 + %arrayinit.element71 = getelementptr inbounds i32*, i32** %arrayinit.element70, i64 1 + store i32* @v, i32** %arrayinit.element71, align 8 + %arrayinit.element72 = getelementptr inbounds i32*, i32** %arrayinit.element71, i64 1 + store i32* @x, i32** %arrayinit.element72, align 8 + %arrayinit.element73 = getelementptr inbounds i32*, i32** %arrayinit.element72, i64 1 + store i32* null, i32** %arrayinit.element73, align 8 + %arrayinit.element74 = getelementptr inbounds i32*, i32** %arrayinit.element73, i64 1 + store i32* null, i32** %arrayinit.element74, align 8 + %arrayinit.element75 = getelementptr inbounds i32*, i32** %arrayinit.element74, i64 1 + store i32* %t9, i32** %arrayinit.element75, align 8 + %arrayinit.element76 = getelementptr inbounds i32*, i32** %arrayinit.element75, i64 1 + store i32* @p, i32** %arrayinit.element76, align 8 + %arrayinit.element77 = getelementptr inbounds i32*, i32** %arrayinit.element76, i64 1 + store i32* @u, i32** %arrayinit.element77, align 8 + %arrayinit.element78 = getelementptr inbounds i32*, i32** %arrayinit.element77, i64 1 + store i32* @j, i32** %arrayinit.element78, align 8 + %arrayinit.element79 = getelementptr inbounds i32*, i32** %arrayinit.element78, i64 1 + store i32* @s, i32** %arrayinit.element79, align 8 + %arrayinit.element80 = getelementptr inbounds i32*, i32** %arrayinit.element79, i64 1 + store i32* @w, i32** %arrayinit.element80, align 8 + %arrayinit.element81 = getelementptr inbounds i32*, i32** %arrayinit.element80, i64 1 + store i32* @o, i32** %arrayinit.element81, align 8 + %arrayinit.element82 = getelementptr inbounds i32*, i32** %arrayinit.element81, i64 1 + store i32* @y, i32** %arrayinit.element82, align 8 + %arrayinit.element83 = getelementptr inbounds i32*, i32** %arrayinit.element82, i64 1 + store i32* null, i32** %arrayinit.element83, align 8 + %arrayinit.element84 = getelementptr inbounds i32*, i32** %arrayinit.element83, i64 1 + store i32* @u, i32** %arrayinit.element84, align 8 + %arrayinit.element85 = getelementptr inbounds i32*, i32** %arrayinit.element84, i64 1 + store i32* @m, i32** %arrayinit.element85, align 8 + %arrayinit.element86 = getelementptr inbounds i32*, i32** %arrayinit.element85, i64 1 + store i32* null, i32** %arrayinit.element86, align 8 + %arrayinit.element87 = getelementptr inbounds i32*, i32** %arrayinit.element86, i64 1 + store i32* @s, i32** %arrayinit.element87, align 8 + %arrayinit.element88 = getelementptr inbounds i32*, i32** %arrayinit.element87, i64 1 + store i32* @e, i32** %arrayinit.element88, align 8 + %arrayinit.element89 = getelementptr inbounds i32*, i32** %arrayinit.element88, i64 1 + store i32* null, i32** %arrayinit.element89, align 8 + %arrayinit.element90 = getelementptr inbounds i32*, i32** %arrayinit.element89, i64 1 + store i32* %t9, i32** %arrayinit.element90, align 8 + %arrayinit.element91 = getelementptr inbounds [45 x i32*], [45 x i32*]* %arrayinit.element45, i64 1 + %1 = bitcast [45 x i32*]* %arrayinit.element91 to i8* + call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 360, i32 8, i1 false) + %arrayinit.begin92 = getelementptr inbounds [45 x i32*], [45 x i32*]* %arrayinit.element91, i64 0, i64 0 + store i32* @j, i32** %arrayinit.begin92, align 8 + %arrayinit.start = getelementptr inbounds [45 x i32*], [45 x i32*]* %arrayinit.element91, i64 1 + %arrayinit.end = getelementptr inbounds [45 x i32*], [45 x i32*]* %arrayinit.begin, i64 4 + br label %arrayinit.body + +arrayinit.body: ; preds = %arrayinit.body, %entry + %arrayinit.cur = phi [45 x i32*]* [ %arrayinit.start, %entry ], [ %arrayinit.next, %arrayinit.body ] + %2 = bitcast [45 x i32*]* %arrayinit.cur to i8* + call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 360, i32 8, i1 false) + %arrayinit.next = getelementptr inbounds [45 x i32*], [45 x i32*]* %arrayinit.cur, i64 1 + %arrayinit.done = icmp eq [45 x i32*]* %arrayinit.next, %arrayinit.end + br i1 %arrayinit.done, label %arrayinit.end93, label %arrayinit.body + +arrayinit.end93: ; preds = %arrayinit.body + %3 = load i8, i8* %t11, align 1 + %conv = zext i8 %3 to i32 + store i32 %conv, i32* @t3, align 4 + %4 = bitcast %struct.S4* %agg.tmp.ensured to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %4, i8* bitcast (%struct.S4* @t4 to i8*), i64 32, i32 4, i1 true) + %5 = bitcast %struct.S2* %agg.tmp.ensured94 to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %5, i8* bitcast (%struct.S2* @t6 to i8*), i64 4, i32 4, i1 true) + %arraydecay = getelementptr inbounds [216 x %struct.S1**], [216 x %struct.S1**]* %t12, i32 0, i32 0 + %6 = load i32, i32* @d, align 4 + %7 = load i32, i32* @d, align 4 + %cmp = icmp sle i32 6, %7 + br i1 %cmp, label %land.rhs, label %land.end + +land.rhs: ; preds = %arrayinit.end93 + %8 = load i32, i32* @t7, align 4 + %tobool = icmp ne i32 %8, 0 + br label %land.end + +land.end: ; preds = %land.rhs, %arrayinit.end93 + %9 = phi i1 [ false, %arrayinit.end93 ], [ %tobool, %land.rhs ] + %land.ext = zext i1 %9 to i32 + %xor = xor i32 %6, %land.ext + %cmp96 = icmp ne %struct.S1*** %arraydecay, null + %conv97 = zext i1 %cmp96 to i32 + %10 = bitcast %struct.S4* %agg.tmp.ensured98 to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %10, i8* bitcast (%struct.S4* @t5 to i8*), i64 32, i32 4, i1 true) + %call = call [2 x i64] @fn1() + %11 = bitcast %struct.S3* %coerce to [2 x i64]* + store [2 x i64] %call, [2 x i64]* %11, align 8 + %12 = bitcast %struct.S3* %t8 to i8* + %13 = bitcast %struct.S3* %coerce to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %12, i8* %13, i64 16, i32 8, i1 true) + %14 = load i32, i32* @t3, align 4 + %cmp99 = icmp ne i32 %14, 24065 + %conv100 = zext i1 %cmp99 to i32 + %15 = load i32, i32* @d, align 4 + %conv101 = sext i32 %15 to i64 + %cmp102 = icmp sge i64 4, %conv101 + %conv103 = zext i1 %cmp102 to i32 + %cmp104 = icmp ne i32 %conv100, %conv103 + br i1 %cmp104, label %land.rhs106, label %land.end107 + +land.rhs106: ; preds = %land.end + br label %land.end107 + +land.end107: ; preds = %land.rhs106, %land.end + %16 = phi i1 [ false, %land.end ], [ true, %land.rhs106 ] + %land.ext108 = zext i1 %16 to i32 + %call109 = call [2 x i64] @fn2() + store [2 x i64] %call109, [2 x i64]* %tmp, align 8 + %17 = bitcast [2 x i64]* %tmp to i8* + %18 = bitcast %struct.S1* %coerce110 to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %18, i8* %17, i64 12, i32 4, i1 false) + %19 = load i32, i32* @c, align 4 + store i32 %19, i32* @t1, align 4 + %20 = load i32, i32* @t3, align 4 + store i32 %20, i32* @b, align 4 + %21 = load i32, i32* @t3, align 4 + %call111 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i32 0, i32 0), i32 %21) + %22 = load i32, i32* %retval, align 4 + ret i32 %22 +} + +declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i32, i1) + +declare i32 @printf(i8*, ...)