Hi Dmitry, Thank you for getting back to me so quickly :) I completely missed that trunk was available in Compiler Explorer, nice to see that it emits the instructions I was asking about.
I tried compiling my ISPC programs with trunk but I ran into a compiler bug. Didn't find a similar one that had already been reported so I filed https://github.com/ispc/ispc/issues/1711. Cheers, Michael Den måndag 13 april 2020 kl. 18:38:44 UTC+2 skrev Dmitry Babokin: > > Hi Michael, > > I'm glad that I have an easy answer for you. Try ispc trunk, instead of > v1.12. It has a fix. Download page has links to ispc trunk for Linux and > Windows. If you need Mac, I can build it for you manually. Compile Explorer > also has ispc trunk. > > I'm curious if this fixes all code gen issues in your code and if ispc > performs on par with intrinsics version. > > Dmitry. > > On Mon, Apr 13, 2020 at 9:01 AM Michael Andersson <[email protected] > <javascript:>> wrote: > >> Hi, >> I've been working on a few different implementations of a simple ray >> tracer where one is implemented using intrinsics and one using ISPC. Long >> story short, the intrinsics version outperforms the ISPC one and it appears >> to be the ray/aabb intersection test that is slower. I did a comparison >> with Compiler Explorer and one difference I noticed is that ISPC emits >> vcmpleps + vblendvps as opposed to vminps/vmaxps (see >> https://godbolt.org/z/ZD7Vpr for details). I have yet to determine with >> absolute certainty that this specific difference between the intrinsics >> version and the one written in ISPC is causing the performance difference >> but it seems a resonable cause given that the former ends up having less >> instructions than the latter. >> >> 1. Is there a specific reason why ISPC emits vcmpleps + vblendvps instead >> of vminps/vmaxps? >> 2. Is there something I can do, be it provide a specific compiler flag or >> write the intersection routine differently, to make ISPC emit vminps/vmaxps >> instructions? >> >> Thanks >> Michael >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Intel SPMD Program Compiler Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ispc-users/d86e5c0a-dd18-4a50-9517-9924a8056dc5%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ispc-users/d86e5c0a-dd18-4a50-9517-9924a8056dc5%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ispc-users/0e53eec5-26a3-4707-8a7f-6c785ee1dbfa%40googlegroups.com.
