-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86_32: legalize {istore,sload,uload}32.i64.
Fixes #1747. Co-authored-by: bjorn3
- Loading branch information
1 parent
8d7ba0a
commit ecc4fdc
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
cranelift/filetests/filetests/isa/x86/legalize-x86_32-loadstore32.clif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
; Test the legalization of load32/store32.i64 instructions on x86_32. | ||
|
||
test compile | ||
target i686 | ||
|
||
function u0:0(i32, i32, i32) { | ||
block0(v0: i32, v1: i32, v2: i32): | ||
v3 = iconcat v1, v2 | ||
; check: v4 = fill v1 | ||
; nextln: v5 = fill v0 | ||
; nextln: store v4, v5 | ||
istore32.i64 v3, v0 | ||
return | ||
} | ||
|
||
function u0:1(i32) -> i32 { | ||
block0(v0: i32): | ||
; check: v7 = fill v0 | ||
; nextln: v4 = load.i32 v7 | ||
v1 = sload32.i32 v0 | ||
v2, v3 = isplit v1 | ||
; check: return v4 | ||
return v2 | ||
} | ||
|
||
function u0:2(i32) -> i32 { | ||
block0(v0: i32): | ||
; check: v6 = fill v0 | ||
; nextln: v4 = load.i32 v6 | ||
v1 = uload32.i32 v0 | ||
v2, v3 = isplit v1 | ||
; check: return v4 | ||
return v2 | ||
} |