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