Commit 6c2d418
authored
[libclc] Fix int<->float conversion builtins (#126905)
While working on moving the conversion builtins to the CLC library in
25c0554 it was discovered that many weren't passing the OpenCL-CTS
tests.
As it happens, the clspv-specific code for conversion implementations
between integer and floating-point types was more correct. However:
* The clspv code was generating 'sat' conversions to floating-point
types, which are not legal
* The clspv code around rtn/rtz conversions needed tweaking as it wasn't
validating when sizeof(dst) > sizeof(src), e.g., int -> double.
With this commit, the CTS failures seen before have been resolved.
This also assumes that the new implementations are correct also for
clspv. If this is the case, then 'clc' and 'clspv' modes are mutually
exclusive and we can simplify the build process for conversions by not
building clc-clspv-convert.cl.1 parent 7a9f53c commit 6c2d418
1 file changed
+7
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
376 | 375 | | |
377 | 376 | | |
378 | 377 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
| 378 | + | |
388 | 379 | | |
389 | 380 | | |
390 | 381 | | |
| |||
494 | 485 | | |
495 | 486 | | |
496 | 487 | | |
497 | | - | |
| 488 | + | |
498 | 489 | | |
499 | 490 | | |
500 | 491 | | |
| |||
507 | 498 | | |
508 | 499 | | |
509 | 500 | | |
510 | | - | |
| 501 | + | |
511 | 502 | | |
512 | 503 | | |
513 | 504 | | |
| |||
533 | 524 | | |
534 | 525 | | |
535 | 526 | | |
536 | | - | |
| 527 | + | |
537 | 528 | | |
538 | 529 | | |
539 | 530 | | |
| |||
0 commit comments