Fix legalization of icmp ugt (#1278)

Previously, the same pattern (pmax + pcmpeq) as `uge` was used but this logic was incorrect for operands with equal values.
This commit is contained in:
Andrew Brown
2019-12-16 13:14:51 -08:00
committed by Sean Stangl
parent 6181f20326
commit 4433ad2858
3 changed files with 25 additions and 5 deletions

View File

@@ -158,6 +158,20 @@ ebb0:
}
; run
function %icmp_ult_i16x8() -> b1 {
ebb0:
v0 = vconst.i16x8 [-1 -1 -1 -1 -1 -1 -1 -1]
v1 = vconst.i16x8 [-1 -1 -1 -1 -1 -1 -1 -1]
v2 = icmp ult v0, v1
v3 = vconst.i16x8 0x00
v4 = raw_bitcast.i16x8 v2
v5 = icmp eq v3, v4
v8 = vall_true v5
return v8
}
; run
function %icmp_sle_i16x8() -> b1 {
ebb0:
v0 = vconst.i16x8 [-1 -1 0 0 0 0 0 0]