Files
wasmtime/cranelift/filetests/filetests/preopt/branch.clif
Anton Kirilov a1b39276e1 Enable more CLIF tests on AArch64
The tests for the SIMD floating-point maximum and minimum operations
require particular care because the handling of the NaN values is
non-deterministic and may vary between platforms. There is no way to
match several NaN values in a test, so the solution is to extract the
non-deterministic test cases into a separate file that is subsequently
replicated for every backend under test, with adjustments made to the
expected results.

Copyright (c) 2021, Arm Limited.
2021-08-17 13:27:58 +01:00

81 lines
1.5 KiB
Plaintext

test preopt
target aarch64
target x86_64
function %brz_fold() -> i32 {
block0:
v0 = bconst.b1 false
brz v0, block2
jump block1
block1:
v1 = iconst.i32 42
return v1
block2:
v2 = iconst.i32 24
return v2
}
; sameln: function %brz_fold
; nextln: block0:
; nextln: v0 = bconst.b1 false
; nextln: jump block2
; nextln:
; nextln: block1:
; nextln: v1 = iconst.i32 42
; nextln: return v1
; nextln:
; nextln: block2:
; nextln: v2 = iconst.i32 24
; nextln: return v2
; nextln: }
function %brnz_fold() -> i32 {
block0:
v0 = bconst.b1 true
brnz v0, block2
jump block1
block1:
v1 = iconst.i32 42
return v1
block2:
v2 = iconst.i32 24
return v2
}
; sameln: function %brnz_fold
; nextln: block0:
; nextln: v0 = bconst.b1 true
; nextln: jump block2
; nextln:
; nextln: block1:
; nextln: v1 = iconst.i32 42
; nextln: return v1
; nextln:
; nextln: block2:
; nextln: v2 = iconst.i32 24
; nextln: return v2
; nextln: }
function %brz_fold_param(b1) -> i32 {
block0(v0: b1):
brz v0, block2
jump block1
block1:
v1 = iconst.i32 42
return v1
block2:
v2 = iconst.i32 24
return v2
}
; sameln: function %brz_fold_param(b1) -> i32 fast {
; nextln: block0(v0: b1):
; nextln: brz v0, block2
; nextln: jump block1
; nextln:
; nextln: block1:
; nextln: v1 = iconst.i32 42
; nextln: return v1
; nextln:
; nextln: block2:
; nextln: v2 = iconst.i32 24
; nextln: return v2
; nextln: }