Merge pull request #2043 from cfallin/csel-opt

Aarch64: handle csel with icmp/fcmp source without materializing the bool.
This commit is contained in:
Chris Fallin
2020-07-18 19:33:47 -07:00
committed by GitHub
2 changed files with 53 additions and 11 deletions

View File

@@ -41,3 +41,14 @@ block0(v0: b1, v1: i8, v2: i8):
; check: subs wzr
; nextln: csel
function %i(i32, i8, i8) -> i8 {
block0(v0: i32, v1: i8, v2: i8):
v3 = iconst.i32 42
v4 = icmp.i32 eq v0, v3
v5 = select.i8 v4, v1, v2
return v5
}
; check: subs wzr, w0, #42
; nextln: csel x0, x1, x2, eq