Skip to content

Commit

Permalink
Add special test case for i16x8.relaxed_laneselect
Browse files Browse the repository at this point in the history
  • Loading branch information
ngzhian committed Sep 7, 2023
1 parent f7e861c commit cd9c447
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/core/relaxed-simd/relaxed_laneselect.wast
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@
(either (v128.const i16x8 0 9 0x1278 0x5634 12 13 14 15)
(v128.const i16x8 0 9 0x1234 0x5678 12 13 14 15)))

;; special case for i16x8 to allow pblendvb
(assert_return (invoke "i16x8.relaxed_laneselect"
(v128.const i16x8 0 1 0x1234 0x1234 4 5 6 7)
(v128.const i16x8 8 9 0x5678 0x5678 12 13 14 15)
(v128.const i16x8 0xffff 0 0xff00 0x0080 0 0 0 0)) ;; 0x0080 is the special case
(either (v128.const i16x8 0 9 0x1278 0x5678 12 13 14 15) ;; bitselect
(v128.const i16x8 0 9 0x1234 0x5678 12 13 14 15) ;; top bit of i16 lane examined
(v128.const i16x8 0 9 0x1278 0x5634 12 13 14 15) ;; top bit of each byte
))

(assert_return (invoke "i32x4.relaxed_laneselect"
(v128.const i32x4 0 1 0x12341234 0x12341234)
(v128.const i32x4 4 5 0x56785678 0x56785678)
Expand Down

0 comments on commit cd9c447

Please sign in to comment.