committed by
Dan Gohman
parent
75ec950a12
commit
4ee2747c5b
19
cranelift/filetests/filetests/preopt/constant_fold.clif
Normal file
19
cranelift/filetests/filetests/preopt/constant_fold.clif
Normal file
@@ -0,0 +1,19 @@
|
||||
test preopt
|
||||
target x86_64
|
||||
|
||||
function %constant_fold(f64) -> f64 {
|
||||
ebb0(v0: f64):
|
||||
v1 = f64const 0x1.0000000000000p0
|
||||
v2 = f64const 0x1.0000000000000p1
|
||||
v3 = fadd v1, v2
|
||||
v4 = fadd v3, v0
|
||||
return v4
|
||||
}
|
||||
; sameln: function %constant_fold(f64) -> f64 fast {
|
||||
; nextln: ebb0(v0: f64):
|
||||
; nextln: v1 = f64const 0x1.0000000000000p0
|
||||
; nextln: v2 = f64const 0x1.0000000000000p1
|
||||
; nextln: v3 = f64const 0x1.8000000000000p1
|
||||
; nextln: v4 = fadd v3, v0
|
||||
; nextln: return v4
|
||||
; nextln: }
|
||||
Reference in New Issue
Block a user