1 ; RUN: llc < %s -mcpu=generic -mtriple=x86_64-linux | FileCheck %s
3 @flags_gv = global i64 0
5 ; First without noredzone.
10 define x86_fp80 @f0(float %f) nounwind {
12 %0 = fpext float %f to x86_fp80 ; <x86_fp80> [#uses=1]
16 ; Then with noredzone.
18 ; CHECK: subq $4, %rsp
21 ; CHECK: addq $4, %rsp
23 define x86_fp80 @f1(float %f) nounwind noredzone {
25 %0 = fpext float %f to x86_fp80 ; <x86_fp80> [#uses=1]
29 declare i64 @llvm.x86.flags.read.u64()
30 declare void @llvm.x86.flags.write.u64(i64)
33 ; pushfq and popfq prevent redzones.
34 ; CHECK-LABEL: norz_flags_read:
35 ; CHECK: subq ${{[0-9]+}}, %rsp
41 define x86_fp80 @norz_flags_read(float %f) nounwind {
43 %flags = call i64 @llvm.x86.flags.read.u64()
44 store i64 %flags, ptr @flags_gv
45 %0 = fpext float %f to x86_fp80
49 ; CHECK-LABEL: norz_flags_write:
50 ; CHECK: subq ${{[0-9]+}}, %rsp
56 define x86_fp80 @norz_flags_write(float %f, i64 %flags) nounwind {
58 call void @llvm.x86.flags.write.u64(i64 %flags)
59 %0 = fpext float %f to x86_fp80