; RUN: llc < %s -mtriple=x86_64-linux-gnu -mcpu=atom 2>&1 | \ ; RUN: grep "callq" | not grep "(" ; RUN: llc < %s -mtriple=x86_64-linux-gnu -mcpu=core2 2>&1 | \ ; RUN: grep "callq" | grep "8-byte Folded Reload" %struct.targettype = type {i64} %struct.op_ptr1 = type opaque %struct.op_ptr2 = type opaque %union.anon = type { [8 x i32], [48 x i8] } %struct.const1 = type { [64 x i16], i8 } %struct.const2 = type { [17 x i8], [256 x i8], i8 } %struct.coef1 = type { %struct.ref1, i32, i32, i32, [10 x [64 x i16]*] } %struct.ref1 = type { void (%struct.ref2*)*, i32 (%struct.ref2*)*, void (%struct.ref2*)*, i32 (%struct.ref2*, i8***)*, %struct.op_ptr2** } %struct.ref2 = type { %struct.localref13*, %struct.localref15*, %struct.localref12*, i8*, i8, i32, %struct.localref11*, i32, i32, i32, i32, i32, i32, i32, double, i8, i8, i32, i8, i8, i8, i32, i8, i32, i8, i8, i8, i32, i32, i32, i32, i32, i32, i8**, i32, i32, i32, i32, i32, [64 x i32]*, [4 x %struct.const1*], [4 x %struct.const2*], [4 x %struct.const2*], i32, %struct.ref3*, i8, i8, [16 x i8], [16 x i8], [16 x i8], i32, i8, i8, i8, i8, i16, i16, i8, i8, i8, %struct.localref10*, i32, i32, i32, i32, i8*, i32, [4 x %struct.ref3*], i32, i32, i32, [10 x i32], i32, i32, i32, i32, i32, %struct.localref8*, %struct.localref9*, %struct.ref1*, %struct.localref7*, %struct.localref6*, %struct.localref5*, %struct.localref1*, %struct.ref4*, %struct.localref2*, %struct.localref3*, %struct.localref4* } %struct.ref3 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i32, i32, i32, i32, i32, i32, %struct.const1*, i8* } %struct.ref4 = type { void (%struct.ref2*)*, [5 x void (%struct.ref2*, %struct.ref3*, i16*, i8**, i32)*] } %struct.localref1 = type { void (%struct.ref2*)*, i8 (%struct.ref2*, [64 x i16]**)*, i8 } %struct.localref2 = type { void (%struct.ref2*)*, void (%struct.ref2*, i8***, i32*, i32, i8**, i32*, i32)*, i8 } %struct.localref3 = type { void (%struct.ref2*)*, void (%struct.ref2*, i8***, i32, i8**, i32)* } %struct.localref4 = type { {}*, void (%struct.ref2*, i8**, i8**, i32)*, void (%struct.ref2*)*, void (%struct.ref2*)* } %struct.localref5 = type { void (%struct.ref2*)*, i32 (%struct.ref2*)*, i8 (%struct.ref2*)*, i8, i8, i32, i32 } %struct.localref6 = type { i32 (%struct.ref2*)*, void (%struct.ref2*)*, void (%struct.ref2*)*, void (%struct.ref2*)*, i8, i8 } %struct.localref7 = type { void (%struct.ref2*, i32)*, void (%struct.ref2*, i8***, i32*, i32, i8**, i32*, i32)* } %struct.localref8 = type { void (%struct.ref2*)*, void (%struct.ref2*)*, i8 } %struct.localref9 = type { void (%struct.ref2*, i32)*, void (%struct.ref2*, i8**, i32*, i32)* } %struct.localref10 = type { %struct.localref10*, i8, i32, i32, i8* } %struct.localref11 = type { i8*, %struct.targettype, void (%struct.ref2*)*, i8 (%struct.ref2*)*, void (%struct.ref2*, %struct.targettype)*, i8 (%struct.ref2*, i32)*, void (%struct.ref2*)* } %struct.localref12 = type { {}*, %struct.targettype, %struct.targettype, i32, i32 } %struct.localref13 = type { void (%struct.localref14*)*, void (%struct.localref14*, i32)*, void (%struct.localref14*)*, void (%struct.localref14*, i8*)*, void (%struct.localref14*)*, i32, %union.anon, i32, %struct.targettype, i8**, i32, i8**, i32, i32 } %struct.localref14 = type { %struct.localref13*, %struct.localref15*, %struct.localref12*, i8*, i8, i32 } %struct.localref15 = type { i8* (%struct.localref14*, i32, %struct.targettype)*, i8* (%struct.localref14*, i32, %struct.targettype)*, i8** (%struct.localref14*, i32, i32, i32)*, [64 x i16]** (%struct.localref14*, i32, i32, i32)*, %struct.op_ptr1* (%struct.localref14*, i32, i8, i32, i32, i32)*, %struct.op_ptr2* (%struct.localref14*, i32, i8, i32, i32, i32)*, {}*, i8** (%struct.localref14*, %struct.op_ptr1*, i32, i32, i8)*, [64 x i16]** (%struct.localref14*, %struct.op_ptr2*, i32, i32, i8)*, void (%struct.localref14*, i32)*, {}*, %struct.targettype, %struct.targettype} define internal i32 @foldedreload(%struct.ref2* %cinfo, i8*** nocapture %output1) { %1 = getelementptr inbounds %struct.ref2* %cinfo, i64 0, i32 79 %2 = load %struct.ref1** %1, align 8 %3 = bitcast %struct.ref1* %2 to %struct.coef1* %4 = getelementptr inbounds %struct.ref2* %cinfo, i64 0, i32 68 %5 = load i32* %4, align 4 %6 = add i32 %5, -1 %7 = getelementptr inbounds %struct.ref2* %cinfo, i64 0, i32 64 %8 = load i32* %7, align 4 %9 = add i32 %8, -1 %10 = getelementptr inbounds %struct.coef1* %3, i64 0, i32 2 %11 = load i32* %10, align 4 %12 = getelementptr inbounds %struct.ref1* %2, i64 1, i32 1 %13 = bitcast i32 (%struct.ref2*)** %12 to i32* %14 = load i32* %13, align 4 %15 = icmp slt i32 %11, %14 br i1 %15, label %.lr.ph18, label %._crit_edge19 .lr.ph18: %16 = getelementptr inbounds %struct.ref1* %2, i64 1 %17 = bitcast %struct.ref1* %16 to i32* %18 = getelementptr inbounds %struct.ref2* %cinfo, i64 0, i32 66 %19 = getelementptr inbounds %struct.ref2* %cinfo, i64 0, i32 84 %20 = getelementptr inbounds %struct.ref2* %cinfo, i64 0, i32 36 %21 = getelementptr inbounds %struct.ref1* %2, i64 1, i32 2 %22 = bitcast void (%struct.ref2*)** %21 to [10 x [64 x i16]*]* %.pre = load i32* %17, align 4 br label %23 ;