ISLE: simplify select/bitselect when both choices are the same (#6141)
This commit is contained in:
@@ -5,6 +5,20 @@ target aarch64
|
||||
target s390x
|
||||
target riscv64
|
||||
|
||||
function %select_self(i8, i32) -> i32 {
|
||||
block0(v0: i8, v1: i32):
|
||||
v2 = select v0, v1, v1
|
||||
return v2
|
||||
; check: return v1
|
||||
}
|
||||
|
||||
function %bitselect_self(i32, i32) -> i32 {
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = bitselect v0, v1, v1
|
||||
return v2
|
||||
; check: return v1
|
||||
}
|
||||
|
||||
function %select_sgt_to_smax(i32, i32) -> i32 {
|
||||
block0(v0: i32, v1: i32):
|
||||
v2 = icmp sgt v0, v1
|
||||
|
||||
Reference in New Issue
Block a user