1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-exceptions
16 // Suppress diagnostics about deprecated volatile operations
17 #if defined(__GNUC__) && !defined(__clang__)
18 # pragma GCC diagnostic ignored "-Wvolatile"
21 // Compile with -Os to get compiler uses float registers to hold float variables
23 double get_(int x
) { return (double)x
; }
25 double (* volatile get
)(int) = get_
;
32 for (counter
= 100; counter
; counter
= counter
- 1)
42 for (counter
= 100; counter
; counter
= counter
- 1)
53 for (counter
= 100; counter
; counter
= counter
- 1)
54 a
+= get(1) + b
+ c
+ d
;
56 return get(0)+a
+b
+c
+d
;
65 for (counter
= 100; counter
; counter
= counter
- 1)
66 a
+= get(1) + b
+c
+d
+e
;
68 return get(0)+a
+b
+c
+d
+e
;
78 for (counter
= 100; counter
; counter
= counter
- 1)
79 a
+= get(1) + b
+c
+d
+e
+f
;
81 return get(0)+a
+b
+c
+d
+e
+f
;
92 for (counter
= 100; counter
; counter
= counter
- 1)
93 a
+= get(1) + b
+c
+d
+e
+f
+g
;
95 return get(0)+a
+b
+c
+d
+e
+f
+g
;
107 for (counter
= 100; counter
; counter
= counter
- 1)
108 a
+= get(1) + b
+c
+d
+e
+f
+g
+h
;
110 return get(0)+a
+b
+c
+d
+e
+f
+g
+h
;
113 double try8(bool v
) {
123 for (counter
= 100; counter
; counter
= counter
- 1)
124 a
+= get(1) + b
+c
+d
+e
+f
+g
+h
+i
;
126 return get(0)+a
+b
+c
+d
+e
+f
+g
+h
+i
;
255 return a
+b
+c
+d
+e
+f
+g
+h
;
260 int main(int, char**) {