1
- ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
1
+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function powi
2
2
; RUN: opt -instcombine -S < %s | FileCheck %s
3
3
4
4
declare double @llvm.powi.f64 (double , i32 ) nounwind readonly
@@ -21,17 +21,19 @@ declare double @llvm.rint.f64(double %Val) nounwind readonly
21
21
declare double @llvm.nearbyint.f64 (double %Val ) nounwind readonly
22
22
23
23
define void @powi (double %V , double *%P ) {
24
- %A = tail call double @llvm.powi.f64 (double %V , i32 -1 ) nounwind
24
+ ; CHECK-LABEL: @powi(
25
+ ; CHECK-NEXT: [[A:%.*]] = fdiv double 1.000000e+00, [[V:%.*]]
26
+ ; CHECK-NEXT: store volatile double [[A]], double* [[P:%.*]], align 8
27
+ ; CHECK-NEXT: [[D:%.*]] = fmul double [[V]], [[V]]
28
+ ; CHECK-NEXT: store volatile double [[D]], double* [[P]], align 8
29
+ ; CHECK-NEXT: ret void
30
+ ;
31
+ %A = tail call fast double @llvm.powi.f64 (double %V , i32 -1 ) nounwind
25
32
store volatile double %A , double * %P
26
33
27
- %D = tail call double @llvm.powi.f64 (double %V , i32 2 ) nounwind
34
+ %D = tail call nnan double @llvm.powi.f64 (double %V , i32 2 ) nounwind
28
35
store volatile double %D , double * %P
29
36
ret void
30
- ; CHECK-LABEL: @powi(
31
- ; CHECK: %A = fdiv double 1.0{{.*}}, %V
32
- ; CHECK: store volatile double %A,
33
- ; CHECK: %D = fmul double %V, %V
34
- ; CHECK: store volatile double %D
35
37
}
36
38
37
39
define i32 @cttz (i32 %a ) {
0 commit comments