-
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.
Legalize 64 bit shifts on x86_32 using PSLLQ/PSRLQ.
Co-authored-by: iximeow <git@iximeow.net>
- Loading branch information
1 parent
2331403
commit 4ec16fa
Showing
4 changed files
with
133 additions
and
1 deletion.
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
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
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
51 changes: 51 additions & 0 deletions
51
cranelift/filetests/filetests/isa/x86/legalize-x86_32-shifts.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,51 @@ | ||
test compile | ||
set enable_simd | ||
target i686 haswell | ||
|
||
function u0:1(i32) -> i64 system_v { | ||
block1(v0: i32): | ||
v1 = load.i64 notrap aligned v0+0 | ||
v2 = load.i32 notrap aligned v0+16 | ||
v3 = ishl v1, v2 | ||
return v3 | ||
} | ||
|
||
function u0:2(i32) -> i64 system_v { | ||
block1(v0: i32): | ||
v1 = load.i64 notrap aligned v0+0 | ||
v2 = load.i64 notrap aligned v0+16 | ||
v3 = ishl v1, v2 | ||
return v3 | ||
} | ||
|
||
function u0:3(i32) -> i32 system_v { | ||
block1(v0: i32): | ||
v1 = load.i32 notrap aligned v0+0 | ||
v2 = load.i64 notrap aligned v0+16 | ||
v3 = ishl v1, v2 | ||
return v3 | ||
} | ||
|
||
function u0:4(i32) -> i64 system_v { | ||
block1(v0: i32): | ||
v1 = load.i64 notrap aligned v0+0 | ||
v2 = load.i32 notrap aligned v0+16 | ||
v3 = ushr v1, v2 | ||
return v3 | ||
} | ||
|
||
function u0:5(i32) -> i64 system_v { | ||
block1(v0: i32): | ||
v1 = load.i64 notrap aligned v0+0 | ||
v2 = load.i64 notrap aligned v0+16 | ||
v3 = ushr v1, v2 | ||
return v3 | ||
} | ||
|
||
function u0:6(i32) -> i32 system_v { | ||
block1(v0: i32): | ||
v1 = load.i32 notrap aligned v0+0 | ||
v2 = load.i64 notrap aligned v0+16 | ||
v3 = ushr v1, v2 | ||
return v3 | ||
} |