sb-simd-avx:f64.4-reverse is broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
There are a handful of sb-simd functions defined in terms of undefined fake VOPs.
(require "SB-SIMD")
(loop for fn in (sb-simd-
unless (fboundp (sb-simd-
collect (sb-simd-
=> (SB-SIMD:
SB-
SB-
SB-
SB-
SB-
SB-
SB-
SB-
(sb-simd-
=>
debugger invoked on a UNDEFINED-FUNCTION @21A208E4 in thread
#<THREAD "main thread" RUNNING {1004858073}>:
The function SB-SIMD-
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [CONTINUE ] Retry calling SB-SIMD-
1: [USE-VALUE ] Call specified function.
2: [RETURN-VALUE ] Return specified values.
3: [RETURN-NOTHING] Return zero values.
4: [ABORT ] Exit debugger, returning to top level.
("undefined function" #<SIMD-PACK-256 1.0000000000000d+0 2.0000000000000d+0 3.0000000000000d+0 4.0000000000000
There is a test named check-package for which checks for exported symbols with no attached definition in contrib/
sb-simd-
(sb-simd:
(f64.4-permute (f64.4-permute2f128 a a 1) 5))
It was commented out in https:/
This patch adds the fake VOP
(define-fake-vop f64.4-reverse (x)
(%f64.4-permute (%f64.4-permute128 x x #4r01) #4r11))
to contrib/
I left the :cost at 2, because f64.4-permute and f64.4-permute128 both have a cost of 1.
Note that an equivalent operation is currently used in https:/
As for the other symbols, which are internal:
In contrib/
SB-SIMD-
Their corresponding fake VOPs were defined in a commented-out section of code/define-
https:/
The file code/define-
https:/
This patch deletes those two symbols, since I believe they were intended to have been deleted along with the other -hsum and -hprod functions that used to exist for other instruction sets.
In contrib/
SB-SIMD:
https:/
but as far as I can tell, they never had their fake VOPs implemented.
The fake VOPs for SB-SIMD:
I added a test similar to the loop above called check-instructi
Changed in sbcl: | |
assignee: | nobody → Marco Heisig (marco-heisig-h) |
Changed in sbcl: | |
status: | Confirmed → Fix Committed |
assignee: | Marco Heisig (marco-heisig-h) → nobody |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
You are right, you found several remnants from the past that should either be removed, or modernized.
I am working on a solution for all of these that also incorporates your patch. Stay tuned.