egraphs: Add bmask bit pattern optimization rule (#6196)
* egraphs: Add a bmask bit pattern optimization * egraphs: Add more `ineg` rules * egraphs: Add sshr rule * egraphs: Simplify bmask rule * egraphs: Add comutative version of bmask rule * egraphs: Add more testcases * egraphs: Cleanup rule comments * egraphs: Add more `ineg` optimizations
This commit is contained in:
@@ -204,3 +204,14 @@ block0(v0: i8):
|
||||
; check: v5 = sextend.i64 v0
|
||||
; check: return v5
|
||||
}
|
||||
|
||||
|
||||
function %ineg_ushr_to_sshr(i64) -> i64 {
|
||||
block0(v0: i64):
|
||||
v1 = iconst.i64 63
|
||||
v2 = ushr v0, v1
|
||||
v3 = ineg v2
|
||||
return v3
|
||||
; check: v4 = sshr v0, v1
|
||||
; check: return v4
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user