Skip to content

Commit

Permalink
egraphs: Update file-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timjrd committed Aug 29, 2023
1 parent 7f2358c commit 78a91bc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions cranelift/filetests/filetests/egraph/cprop.clif
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ block0:
return v2
}

; check: v3 = iconst.i16 0xfffe
; check: v3 = iconst.i16 -2
; nextln: return v3

function %ishl() -> i8 {
Expand Down Expand Up @@ -96,7 +96,7 @@ block0:
return v2
}

; check: v3 = iconst.i8 252
; check: v3 = iconst.i8 -4
; check: return v3

function %sshr_i8_i16() -> i8 {
Expand All @@ -107,7 +107,7 @@ block0:
return v2
}

; check: v3 = iconst.i8 252
; check: v3 = iconst.i8 -4
; check: return v3

function %sshr_i16_i8() -> i16 {
Expand All @@ -118,7 +118,7 @@ block0:
return v2
}

; check: v3 = iconst.i16 0xfffc
; check: v3 = iconst.i16 -4
; check: return v3

function %icmp_eq_i32() -> i8 {
Expand Down Expand Up @@ -238,7 +238,7 @@ block0:
return v2
}

; check: v3 = iconst.i8 246
; check: v3 = iconst.i8 -10
; nextln: return v3

function %sextend_iconst() -> i32 {
Expand All @@ -248,7 +248,7 @@ block0:
return v2
}

; check: v3 = iconst.i32 0xffff_fff6
; check: v3 = iconst.i32 -10
; nextln: return v3

function %uextend_iconst() -> i32 {
Expand Down
32 changes: 16 additions & 16 deletions cranelift/filetests/filetests/egraph/icmp-parameterized.clif
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ block0(v0: i32):

; function %icmp_eq_umax(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0xffff_ffff
; v1 = iconst.i32 -1
; v2 = icmp eq v0, v1 ; v1 = 0xffff_ffff
; return v2
; }
Expand All @@ -206,7 +206,7 @@ block0(v0: i32):

; function %icmp_eq_smin(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0x8000_0000
; v1 = iconst.i32 0xffff_ffff_8000_0000
; v2 = icmp eq v0, v1 ; v1 = 0x8000_0000
; return v2
; }
Expand Down Expand Up @@ -248,7 +248,7 @@ block0(v0: i32):

; function %icmp_ne_umax(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0xffff_ffff
; v1 = iconst.i32 -1
; v2 = icmp ne v0, v1 ; v1 = 0xffff_ffff
; return v2
; }
Expand All @@ -262,7 +262,7 @@ block0(v0: i32):

; function %icmp_ne_smin(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0x8000_0000
; v1 = iconst.i32 0xffff_ffff_8000_0000
; v2 = icmp ne v0, v1 ; v1 = 0x8000_0000
; return v2
; }
Expand Down Expand Up @@ -303,7 +303,7 @@ block0(v0: i32):

; function %icmp_ult_umax(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0xffff_ffff
; v1 = iconst.i32 -1
; v3 = icmp ne v0, v1 ; v1 = 0xffff_ffff
; v4 -> v3
; return v3
Expand All @@ -318,7 +318,7 @@ block0(v0: i32):

; function %icmp_ult_smin(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0x8000_0000
; v1 = iconst.i32 0xffff_ffff_8000_0000
; v2 = icmp ult v0, v1 ; v1 = 0x8000_0000
; return v2
; }
Expand Down Expand Up @@ -374,7 +374,7 @@ block0(v0: i32):

; function %icmp_ule_smin(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0x8000_0000
; v1 = iconst.i32 0xffff_ffff_8000_0000
; v2 = icmp ule v0, v1 ; v1 = 0x8000_0000
; return v2
; }
Expand Down Expand Up @@ -430,7 +430,7 @@ block0(v0: i32):

; function %icmp_ugt_smin(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0x8000_0000
; v1 = iconst.i32 0xffff_ffff_8000_0000
; v2 = icmp ugt v0, v1 ; v1 = 0x8000_0000
; return v2
; }
Expand Down Expand Up @@ -471,7 +471,7 @@ block0(v0: i32):

; function %icmp_uge_umax(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0xffff_ffff
; v1 = iconst.i32 -1
; v3 = icmp eq v0, v1 ; v1 = 0xffff_ffff
; v4 -> v3
; return v3
Expand All @@ -486,7 +486,7 @@ block0(v0: i32):

; function %icmp_uge_smin(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0x8000_0000
; v1 = iconst.i32 0xffff_ffff_8000_0000
; v2 = icmp uge v0, v1 ; v1 = 0x8000_0000
; return v2
; }
Expand Down Expand Up @@ -528,7 +528,7 @@ block0(v0: i32):

; function %icmp_slt_umax(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0xffff_ffff
; v1 = iconst.i32 -1
; v2 = icmp slt v0, v1 ; v1 = 0xffff_ffff
; return v2
; }
Expand Down Expand Up @@ -584,7 +584,7 @@ block0(v0: i32):

; function %icmp_sle_umax(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0xffff_ffff
; v1 = iconst.i32 -1
; v2 = icmp sle v0, v1 ; v1 = 0xffff_ffff
; return v2
; }
Expand All @@ -598,7 +598,7 @@ block0(v0: i32):

; function %icmp_sle_smin(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0x8000_0000
; v1 = iconst.i32 0xffff_ffff_8000_0000
; v3 = icmp eq v0, v1 ; v1 = 0x8000_0000
; v4 -> v3
; return v3
Expand Down Expand Up @@ -640,7 +640,7 @@ block0(v0: i32):

; function %icmp_sgt_umax(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0xffff_ffff
; v1 = iconst.i32 -1
; v2 = icmp sgt v0, v1 ; v1 = 0xffff_ffff
; return v2
; }
Expand All @@ -654,7 +654,7 @@ block0(v0: i32):

; function %icmp_sgt_smin(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0x8000_0000
; v1 = iconst.i32 0xffff_ffff_8000_0000
; v3 = icmp ne v0, v1 ; v1 = 0x8000_0000
; v4 -> v3
; return v3
Expand Down Expand Up @@ -696,7 +696,7 @@ block0(v0: i32):

; function %icmp_sge_umax(i32) -> i8 fast {
; block0(v0: i32):
; v1 = iconst.i32 0xffff_ffff
; v1 = iconst.i32 -1
; v2 = icmp sge v0, v1 ; v1 = 0xffff_ffff
; return v2
; }
Expand Down
10 changes: 5 additions & 5 deletions cranelift/filetests/filetests/egraph/shifts.clif
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ block0(v0: i8):
v2 = ushr v0, v1
v3 = ishl v2, v1
return v3
; check: v4 = iconst.i8 224
; check: v4 = iconst.i8 -32
; check: v5 = band v0, v4
; check: return v5
}
Expand All @@ -19,7 +19,7 @@ block0(v0: i32):
v2 = ushr v0, v1
v3 = ishl v2, v1
return v3
; check: v4 = iconst.i32 0xffff_ffe0
; check: v4 = iconst.i32 -32
; check: v5 = band v0, v4
; check: return v5
}
Expand All @@ -41,7 +41,7 @@ block0(v0: i8):
v2 = sshr v0, v1
v3 = ishl v2, v1
return v3
; check: v4 = iconst.i8 224
; check: v4 = iconst.i8 -32
; check: v5 = band v0, v4
; check: return v5
}
Expand All @@ -52,7 +52,7 @@ block0(v0: i32):
v2 = sshr v0, v1
v3 = ishl v2, v1
return v3
; check: v4 = iconst.i32 0xffff_ffe0
; check: v4 = iconst.i32 -32
; check: v5 = band v0, v4
; check: return v5
}
Expand All @@ -74,7 +74,7 @@ block0(v0: i8):
v2 = sshr v0, v1
v3 = ishl v2, v1
return v3
; check: v4 = iconst.i8 224
; check: v4 = iconst.i8 -32
; check: v5 = band v0, v4
; check: return v5
}
Expand Down

0 comments on commit 78a91bc

Please sign in to comment.