1*9880d681SAndroid Build Coastguard Worker; RUN: llc -stack-symbol-ordering=0 %s -o - -march=x86-64 -mattr=-avx -mtriple=x86_64-unknown-linux-gnu | FileCheck %s --check-prefix=SSE 2*9880d681SAndroid Build Coastguard Worker; RUN: llc -stack-symbol-ordering=0 %s -o - -march=x86-64 -mattr=+avx -mtriple=x86_64-unknown-linux-gnu | FileCheck %s --check-prefix=AVX 3*9880d681SAndroid Build Coastguard Worker; PR4891 4*9880d681SAndroid Build Coastguard Worker; PR5626 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker; This load should be before the call, not after. 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker; SSE: movaps compl+128(%rip), %xmm0 9*9880d681SAndroid Build Coastguard Worker; SSE: movaps %xmm0, (%rsp) 10*9880d681SAndroid Build Coastguard Worker; SSE: callq killcommon 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Worker; AVX: vmovaps compl+128(%rip), %xmm0 13*9880d681SAndroid Build Coastguard Worker; AVX: vmovaps %xmm0, (%rsp) 14*9880d681SAndroid Build Coastguard Worker; AVX: callq killcommon 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Worker@compl = linkonce global [20 x i64] zeroinitializer, align 64 ; <[20 x i64]*> [#uses=1] 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Workerdeclare void @killcommon(i32* noalias) 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Workerdefine void @reset(<2 x float>* noalias %garbage1) { 21*9880d681SAndroid Build Coastguard Worker"file complex.c, line 27, bb1": 22*9880d681SAndroid Build Coastguard Worker %changed = alloca i32, align 4 ; <i32*> [#uses=3] 23*9880d681SAndroid Build Coastguard Worker br label %"file complex.c, line 27, bb13" 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Worker"file complex.c, line 27, bb13": ; preds = %"file complex.c, line 27, bb1" 26*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %changed, align 4 27*9880d681SAndroid Build Coastguard Worker %r2 = getelementptr float, float* bitcast ([20 x i64]* @compl to float*), i64 32 ; <float*> [#uses=1] 28*9880d681SAndroid Build Coastguard Worker %r3 = bitcast float* %r2 to <2 x float>* ; <<2 x float>*> [#uses=1] 29*9880d681SAndroid Build Coastguard Worker %r4 = load <2 x float>, <2 x float>* %r3, align 4 ; <<2 x float>> [#uses=1] 30*9880d681SAndroid Build Coastguard Worker call void @killcommon(i32* %changed) 31*9880d681SAndroid Build Coastguard Worker br label %"file complex.c, line 34, bb4" 32*9880d681SAndroid Build Coastguard Worker 33*9880d681SAndroid Build Coastguard Worker"file complex.c, line 34, bb4": ; preds = %"file complex.c, line 27, bb13" 34*9880d681SAndroid Build Coastguard Worker %r5 = load i32, i32* %changed, align 4 ; <i32> [#uses=1] 35*9880d681SAndroid Build Coastguard Worker %r6 = icmp eq i32 %r5, 0 ; <i1> [#uses=1] 36*9880d681SAndroid Build Coastguard Worker %r7 = zext i1 %r6 to i32 ; <i32> [#uses=1] 37*9880d681SAndroid Build Coastguard Worker %r8 = icmp ne i32 %r7, 0 ; <i1> [#uses=1] 38*9880d681SAndroid Build Coastguard Worker br i1 %r8, label %"file complex.c, line 34, bb7", label %"file complex.c, line 27, bb5" 39*9880d681SAndroid Build Coastguard Worker 40*9880d681SAndroid Build Coastguard Worker"file complex.c, line 27, bb5": ; preds = %"file complex.c, line 34, bb4" 41*9880d681SAndroid Build Coastguard Worker br label %"file complex.c, line 35, bb6" 42*9880d681SAndroid Build Coastguard Worker 43*9880d681SAndroid Build Coastguard Worker"file complex.c, line 35, bb6": ; preds = %"file complex.c, line 27, bb5" 44*9880d681SAndroid Build Coastguard Worker %r11 = ptrtoint <2 x float>* %garbage1 to i64 ; <i64> [#uses=1] 45*9880d681SAndroid Build Coastguard Worker %r12 = inttoptr i64 %r11 to <2 x float>* ; <<2 x float>*> [#uses=1] 46*9880d681SAndroid Build Coastguard Worker store <2 x float> %r4, <2 x float>* %r12, align 4 47*9880d681SAndroid Build Coastguard Worker br label %"file complex.c, line 34, bb7" 48*9880d681SAndroid Build Coastguard Worker 49*9880d681SAndroid Build Coastguard Worker"file complex.c, line 34, bb7": ; preds = %"file complex.c, line 35, bb6", %"file complex.c, line 34, bb4" 50*9880d681SAndroid Build Coastguard Worker ret void 51*9880d681SAndroid Build Coastguard Worker} 52