llvm.org GIT mirror llvm / a8b6f68
This is a carefully contrived testcase where the X86 ISel is emitting all loads before other ops, causing it to spill like mad. This occurs in 164.gzip:flush_block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19648 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
1 changed file(s) with 45 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
6969 ret int %s9
7070 }
7171
72 ;; adds should be the same as muls.
73 int %regpressure3(short* %P, bool %Cond, int* %Other) {
74 %A = load short* %P
75 %Bp = getelementptr short* %P, int 1
76 %B = load short* %Bp
77 %Cp = getelementptr short* %P, int 2
78 %C = load short* %Cp
79 %Dp = getelementptr short* %P, int 3
80 %D = load short* %Dp
81 %Ep = getelementptr short* %P, int 4
82 %E = load short* %Ep
83 %Fp = getelementptr short* %P, int 5
84 %F = load short* %Fp
85 %Gp = getelementptr short* %P, int 6
86 %G = load short* %Gp
87 %Hp = getelementptr short* %P, int 7
88 %H = load short* %Hp
89 %Ip = getelementptr short* %P, int 8
90 %I = load short* %Ip
91 %Jp = getelementptr short* %P, int 9
92 %J = load short* %Jp
93
94 ;; These casts prevent folding the loads into the adds.
95 %A = cast short %A to int
96 %B = cast short %B to int
97 %D = cast short %D to int
98 %C = cast short %C to int
99 %E = cast short %E to int
100 %F = cast short %F to int
101 %G = cast short %G to int
102 %H = cast short %H to int
103 %I = cast short %I to int
104 %J = cast short %J to int
105 %s1 = add int %A, %B
106 %s2 = add int %C, %s1
107 %s3 = add int %D, %s2
108 %s4 = add int %E, %s3
109 %s5 = add int %F, %s4
110 %s6 = add int %G, %s5
111 %s7 = add int %H, %s6
112 %s8 = add int %I, %s7
113 %s9 = add int %J, %s8
114 ret int %s9
115 }
116