Afonso Bordado
1 year ago
committed by
GitHub
6 changed files with 234 additions and 0 deletions
@ -0,0 +1,194 @@ |
|||
test compile precise-output |
|||
set unwind_info=false |
|||
target riscv64 has_v |
|||
|
|||
function %avg_round_i8x16(i8x16, i8x16) -> i8x16 { |
|||
block0(v0: i8x16, v1: i8x16): |
|||
v2 = avg_round v0, v1 |
|||
return v2 |
|||
} |
|||
|
|||
; VCode: |
|||
; add sp,-16 |
|||
; sd ra,8(sp) |
|||
; sd fp,0(sp) |
|||
; mv fp,sp |
|||
; block0: |
|||
; vle8.v v1,16(fp) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vle8.v v3,32(fp) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vand.vv v6,v1,v3 #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vxor.vv v8,v1,v3 #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vssrl.vi v10,v8,1 #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vadd.vv v12,v6,v10 #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vse8.v v12,0(a0) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; ld ra,8(sp) |
|||
; ld fp,0(sp) |
|||
; add sp,+16 |
|||
; ret |
|||
; |
|||
; Disassembled: |
|||
; block0: ; offset 0x0 |
|||
; addi sp, sp, -0x10 |
|||
; sd ra, 8(sp) |
|||
; sd s0, 0(sp) |
|||
; ori s0, sp, 0 |
|||
; block1: ; offset 0x10 |
|||
; .byte 0x57, 0x70, 0x08, 0xcc |
|||
; addi t6, s0, 0x10 |
|||
; .byte 0x87, 0x80, 0x0f, 0x02 |
|||
; addi t6, s0, 0x20 |
|||
; .byte 0x87, 0x81, 0x0f, 0x02 |
|||
; .byte 0x57, 0x83, 0x11, 0x26 |
|||
; .byte 0x57, 0x84, 0x11, 0x2e |
|||
; .byte 0x57, 0xb5, 0x80, 0xaa |
|||
; .byte 0x57, 0x06, 0x65, 0x02 |
|||
; .byte 0x27, 0x06, 0x05, 0x02 |
|||
; ld ra, 8(sp) |
|||
; ld s0, 0(sp) |
|||
; addi sp, sp, 0x10 |
|||
; ret |
|||
|
|||
function %avg_round_i16x8(i16x8, i16x8) -> i16x8 { |
|||
block0(v0: i16x8, v1: i16x8): |
|||
v2 = avg_round v0, v1 |
|||
return v2 |
|||
} |
|||
|
|||
; VCode: |
|||
; add sp,-16 |
|||
; sd ra,8(sp) |
|||
; sd fp,0(sp) |
|||
; mv fp,sp |
|||
; block0: |
|||
; vle8.v v1,16(fp) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vle8.v v3,32(fp) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vand.vv v6,v1,v3 #avl=8, #vtype=(e16, m1, ta, ma) |
|||
; vxor.vv v8,v1,v3 #avl=8, #vtype=(e16, m1, ta, ma) |
|||
; vssrl.vi v10,v8,1 #avl=8, #vtype=(e16, m1, ta, ma) |
|||
; vadd.vv v12,v6,v10 #avl=8, #vtype=(e16, m1, ta, ma) |
|||
; vse8.v v12,0(a0) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; ld ra,8(sp) |
|||
; ld fp,0(sp) |
|||
; add sp,+16 |
|||
; ret |
|||
; |
|||
; Disassembled: |
|||
; block0: ; offset 0x0 |
|||
; addi sp, sp, -0x10 |
|||
; sd ra, 8(sp) |
|||
; sd s0, 0(sp) |
|||
; ori s0, sp, 0 |
|||
; block1: ; offset 0x10 |
|||
; .byte 0x57, 0x70, 0x08, 0xcc |
|||
; addi t6, s0, 0x10 |
|||
; .byte 0x87, 0x80, 0x0f, 0x02 |
|||
; addi t6, s0, 0x20 |
|||
; .byte 0x87, 0x81, 0x0f, 0x02 |
|||
; .byte 0x57, 0x70, 0x84, 0xcc |
|||
; .byte 0x57, 0x83, 0x11, 0x26 |
|||
; .byte 0x57, 0x84, 0x11, 0x2e |
|||
; .byte 0x57, 0xb5, 0x80, 0xaa |
|||
; .byte 0x57, 0x06, 0x65, 0x02 |
|||
; .byte 0x57, 0x70, 0x08, 0xcc |
|||
; .byte 0x27, 0x06, 0x05, 0x02 |
|||
; ld ra, 8(sp) |
|||
; ld s0, 0(sp) |
|||
; addi sp, sp, 0x10 |
|||
; ret |
|||
|
|||
function %avg_round_i32x4(i32x4, i32x4) -> i32x4 { |
|||
block0(v0: i32x4, v1: i32x4): |
|||
v2 = avg_round v0, v1 |
|||
return v2 |
|||
} |
|||
|
|||
; VCode: |
|||
; add sp,-16 |
|||
; sd ra,8(sp) |
|||
; sd fp,0(sp) |
|||
; mv fp,sp |
|||
; block0: |
|||
; vle8.v v1,16(fp) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vle8.v v3,32(fp) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vand.vv v6,v1,v3 #avl=4, #vtype=(e32, m1, ta, ma) |
|||
; vxor.vv v8,v1,v3 #avl=4, #vtype=(e32, m1, ta, ma) |
|||
; vssrl.vi v10,v8,1 #avl=4, #vtype=(e32, m1, ta, ma) |
|||
; vadd.vv v12,v6,v10 #avl=4, #vtype=(e32, m1, ta, ma) |
|||
; vse8.v v12,0(a0) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; ld ra,8(sp) |
|||
; ld fp,0(sp) |
|||
; add sp,+16 |
|||
; ret |
|||
; |
|||
; Disassembled: |
|||
; block0: ; offset 0x0 |
|||
; addi sp, sp, -0x10 |
|||
; sd ra, 8(sp) |
|||
; sd s0, 0(sp) |
|||
; ori s0, sp, 0 |
|||
; block1: ; offset 0x10 |
|||
; .byte 0x57, 0x70, 0x08, 0xcc |
|||
; addi t6, s0, 0x10 |
|||
; .byte 0x87, 0x80, 0x0f, 0x02 |
|||
; addi t6, s0, 0x20 |
|||
; .byte 0x87, 0x81, 0x0f, 0x02 |
|||
; .byte 0x57, 0x70, 0x02, 0xcd |
|||
; .byte 0x57, 0x83, 0x11, 0x26 |
|||
; .byte 0x57, 0x84, 0x11, 0x2e |
|||
; .byte 0x57, 0xb5, 0x80, 0xaa |
|||
; .byte 0x57, 0x06, 0x65, 0x02 |
|||
; .byte 0x57, 0x70, 0x08, 0xcc |
|||
; .byte 0x27, 0x06, 0x05, 0x02 |
|||
; ld ra, 8(sp) |
|||
; ld s0, 0(sp) |
|||
; addi sp, sp, 0x10 |
|||
; ret |
|||
|
|||
function %avg_round_i64x2(i64x2, i64x2) -> i64x2 { |
|||
block0(v0: i64x2, v1: i64x2): |
|||
v2 = avg_round v0, v1 |
|||
return v2 |
|||
} |
|||
|
|||
; VCode: |
|||
; add sp,-16 |
|||
; sd ra,8(sp) |
|||
; sd fp,0(sp) |
|||
; mv fp,sp |
|||
; block0: |
|||
; vle8.v v1,16(fp) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vle8.v v3,32(fp) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; vand.vv v6,v1,v3 #avl=2, #vtype=(e64, m1, ta, ma) |
|||
; vxor.vv v8,v1,v3 #avl=2, #vtype=(e64, m1, ta, ma) |
|||
; vssrl.vi v10,v8,1 #avl=2, #vtype=(e64, m1, ta, ma) |
|||
; vadd.vv v12,v6,v10 #avl=2, #vtype=(e64, m1, ta, ma) |
|||
; vse8.v v12,0(a0) #avl=16, #vtype=(e8, m1, ta, ma) |
|||
; ld ra,8(sp) |
|||
; ld fp,0(sp) |
|||
; add sp,+16 |
|||
; ret |
|||
; |
|||
; Disassembled: |
|||
; block0: ; offset 0x0 |
|||
; addi sp, sp, -0x10 |
|||
; sd ra, 8(sp) |
|||
; sd s0, 0(sp) |
|||
; ori s0, sp, 0 |
|||
; block1: ; offset 0x10 |
|||
; .byte 0x57, 0x70, 0x08, 0xcc |
|||
; addi t6, s0, 0x10 |
|||
; .byte 0x87, 0x80, 0x0f, 0x02 |
|||
; addi t6, s0, 0x20 |
|||
; .byte 0x87, 0x81, 0x0f, 0x02 |
|||
; .byte 0x57, 0x70, 0x81, 0xcd |
|||
; .byte 0x57, 0x83, 0x11, 0x26 |
|||
; .byte 0x57, 0x84, 0x11, 0x2e |
|||
; .byte 0x57, 0xb5, 0x80, 0xaa |
|||
; .byte 0x57, 0x06, 0x65, 0x02 |
|||
; .byte 0x57, 0x70, 0x08, 0xcc |
|||
; .byte 0x27, 0x06, 0x05, 0x02 |
|||
; ld ra, 8(sp) |
|||
; ld s0, 0(sp) |
|||
; addi sp, sp, 0x10 |
|||
; ret |
|||
|
Loading…
Reference in new issue