Fix cranelift_preopt panic

Fix #611
This commit is contained in:
Antoni Boucher
2019-04-28 13:28:17 -04:00
committed by Dan Gohman
parent 75ec950a12
commit 4ee2747c5b
2 changed files with 24 additions and 2 deletions

View 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: }