1 ; REQUIRES: asserts 2 ; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse4.1 -mcpu=penryn -stats 2>&1 | grep "9 machine-licm" 3 ; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse4.1 -mcpu=penryn | FileCheck %s 4 ; rdar://6627786 5 ; rdar://7792037 6 7 target triple = "x86_64-apple-darwin10.0" 8 %struct.Key = type { i64 } 9 %struct.__Rec = type opaque 10 %struct.__vv = type { } 11 12 define %struct.__vv* @t(%struct.Key* %desc, i64 %p) nounwind ssp { 13 entry: 14 br label %bb4 15 16 bb4: ; preds = %bb.i, %bb26, %bb4, %entry 17 ; CHECK: %bb4 18 ; CHECK: xorl 19 ; CHECK: callq 20 ; CHECK: xorl 21 ; CHECK: xorl 22 ; CHECK: movq 23 24 %0 = call i32 (...) @xxGetOffsetForCode(i32 undef) nounwind ; <i32> [#uses=0] 25 %ins = or i64 %p, 2097152 ; <i64> [#uses=1] 26 %1 = call i32 (...) @xxCalculateMidType(%struct.Key* %desc, i32 0) nounwind ; <i32> [#uses=1] 27 %cond = icmp eq i32 %1, 1 ; <i1> [#uses=1] 28 br i1 %cond, label %bb26, label %bb4 29 30 bb26: ; preds = %bb4 31 %2 = and i64 %ins, 15728640 ; <i64> [#uses=1] 32 %cond.i = icmp eq i64 %2, 1048576 ; <i1> [#uses=1] 33 br i1 %cond.i, label %bb.i, label %bb4 34 35 bb.i: ; preds = %bb26 36 %3 = load i32, i32* null, align 4 ; <i32> [#uses=1] 37 %4 = uitofp i32 %3 to float ; <float> [#uses=1] 38 %.sum13.i = add i64 0, 4 ; <i64> [#uses=1] 39 %5 = getelementptr i8, i8* null, i64 %.sum13.i ; <i8*> [#uses=1] 40 %6 = bitcast i8* %5 to i32* ; <i32*> [#uses=1] 41 %7 = load i32, i32* %6, align 4 ; <i32> [#uses=1] 42 %8 = uitofp i32 %7 to float ; <float> [#uses=1] 43 %.sum.i = add i64 0, 8 ; <i64> [#uses=1] 44 %9 = getelementptr i8, i8* null, i64 %.sum.i ; <i8*> [#uses=1] 45 %10 = bitcast i8* %9 to i32* ; <i32*> [#uses=1] 46 %11 = load i32, i32* %10, align 4 ; <i32> [#uses=1] 47 %12 = uitofp i32 %11 to float ; <float> [#uses=1] 48 %13 = insertelement <4 x float> undef, float %4, i32 0 ; <<4 x float>> [#uses=1] 49 %14 = insertelement <4 x float> %13, float %8, i32 1 ; <<4 x float>> [#uses=1] 50 %15 = insertelement <4 x float> %14, float %12, i32 2 ; <<4 x float>> [#uses=1] 51 store <4 x float> %15, <4 x float>* null, align 16 52 br label %bb4 53 } 54 55 declare i32 @xxGetOffsetForCode(...) 56 57 declare i32 @xxCalculateMidType(...) 58