Ahh great find!
I tried it out and it works, if it's not an intrinsic it will return 0,
otherwise some number (no idea how they are enumerated, but who cares).

Roland


Am 21.12.18 um 00:56 schrieb Jose Fonseca:
> There's an function -- LLVMGetIntrinsicID -- I wonder if we can use it
> to trap unsupported intrinsics?
> 
> Jose
> 
> On 20/12/2018 22:09, Roland Scheidegger wrote:
>> Am 20.12.18 um 16:56 schrieb Michel Dänzer:
>>> On 2018-12-19 4:51 a.m., srol...@vmware.com wrote:
>>>> From: Roland Scheidegger <srol...@vmware.com>
>>>>
>>>> This is (much) faster than using the util fallback.
>>>> (Note that there's two methods here, one would use a cache, similar to
>>>> the existing code (although the cache was disabled), except the block
>>>> decode is done with jit code, the other directly decodes the required
>>>> pixels. For now don't use the cache (being direct-mapped is suboptimal,
>>>> but it's difficult to come up with something better which doesn't have
>>>> too much overhead.)
>>>
>>> This change made lp_test_format segfault on my Ryzen 7 1700, both using
>>> LLVM 7 and current SVN HEAD. Not much information in the backtrace
>>> unfortunately:
>>>
>>
>> Ahh I failed to test with newer llvm versions (it works with llvm 5.0 at
>> least).
>> It is (once again...) due to intrinsics disappearing from llvm.
>> I especially hate it that there's seemingly no way to detect if an
>> intrinsic has disappeared, since llvm will just replace it will calls to
>> address 0 if the intrinsic doesn't exist nowadays...
>> Probably it's the llvm.x86.sse2.pavg.b intrinsic, I'll fix it...
>>
>> Roland
>>
>>
>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> 0x0000000000000000 in ?? ()
>>> (gdb) bt
>>> #0  0x0000000000000000 in ?? ()
>>> #1  0x00007ffff7fcd16a in ?? ()
>>> #2  0x2c2c2c2caeaeaeae in ?? ()
>>> #3  0x979797976f6f6f6f in ?? ()
>>> #4  0x000020b00000d7f2 in ?? ()
>>> #5  0x0000976f00002cae in ?? ()
>>> #6  0x0089625d008eb099 in ?? ()
>>> #7  0x7b8487218483a821 in ?? ()
>>> #8  0x008414210094ffd6 in ?? ()
>>> #9  0x007bef9400739629 in ?? ()
>>> #10 0x0000000000000069 in ?? ()
>>> #11 0x00000000000006d0 in ?? ()
>>> #12 0x00007fffffffe490 in ?? ()
>>> #13 0x000055555593f040 in ?? ()
>>> #14 0x00007fffffffe430 in ?? ()
>>> #15 0x00007ffff7fcd053 in ?? ()
>>> #16 0x00007ffff7fcd000 in ?? ()
>>> #17 0x00005555556fd618 in util_format_test_cases ()
>>> #18 0x00005555558c0780 in ?? ()
>>> #19 0x00007fffffffe490 in ?? ()
>>> #20 0x00005555556fd618 in util_format_test_cases ()
>>> #21 0x00005555555667cc in test_format_float (verbose=<optimized out>,
>>> desc=0x7fffffffe4a0, fp=0x0) at
>>> ../src/gallium/drivers/llvmpipe/lp_test_format.c:184
>>> #22 test_one (verbose=<optimized out>, format_desc=0x7fffffffe4a0,
>>> fp=0x0) at ../src/gallium/drivers/llvmpipe/lp_test_format.c:342
>>> #23 test_all (verbose=<optimized out>, fp=0x0) at
>>> ../src/gallium/drivers/llvmpipe/lp_test_format.c:395
>>> #24 0x000055555556621f in main (argc=1, argv=0x7fffffffe628) at
>>> ../src/gallium/drivers/llvmpipe/lp_test_main.c:419
>>>
>>>
>>
> 

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to