-
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.
riscv64: Support non 128bit vector sizes (#6266)
* riscv64: Add `Zvl` extensions * riscv64: Allow lowering SIMD operations that fit in a vector register * riscv64: Support non 128bit vector sizes * riscv64: Add Zvl Presets * riscv64: Precompute `min_vec_reg_size`
- Loading branch information
Showing
12 changed files
with
291 additions
and
32 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
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
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
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
40 changes: 40 additions & 0 deletions
40
cranelift/filetests/filetests/isa/riscv64/simd-iadd-big.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,40 @@ | ||
test compile precise-output | ||
set unwind_info=false | ||
target riscv64 has_v has_zvl2048b | ||
|
||
|
||
|
||
function %iadd_i64x4(i64x4, i64x4) -> i64x4 { | ||
block0(v0:i64x4, v1:i64x4): | ||
v2 = iadd v0, v1 | ||
return v2 | ||
} | ||
|
||
; VCode: | ||
; block0: | ||
; vadd.vv v10,v11,v10 #avl=4, #vtype=(e64, m1, ta, ma) | ||
; ret | ||
; | ||
; Disassembled: | ||
; block0: ; offset 0x0 | ||
; .byte 0x57, 0x70, 0x82, 0xcd | ||
; .byte 0x57, 0x05, 0xb5, 0x02 | ||
; ret | ||
|
||
function %iadd_i64x8(i64x8, i64x8) -> i64x8 { | ||
block0(v0:i64x8, v1:i64x8): | ||
v2 = iadd v0, v1 | ||
return v2 | ||
} | ||
|
||
; VCode: | ||
; block0: | ||
; vadd.vv v10,v11,v10 #avl=8, #vtype=(e64, m1, ta, ma) | ||
; ret | ||
; | ||
; Disassembled: | ||
; block0: ; offset 0x0 | ||
; .byte 0x57, 0x70, 0x84, 0xcd | ||
; .byte 0x57, 0x05, 0xb5, 0x02 | ||
; ret | ||
|
Oops, something went wrong.