[llvm-dev] Dynamic detection of signed integer overflow

Pflanzer, Moritz via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 15 02:12:24 PDT 2015


> I might be misunderstanding you, and I haven't looked at this code lately, but the goal of UBSan is to check C's rules for integer UBs.  Since C does not have vectors, I'm not sure exactly what you are expecting here.  Could you give a bit more detail?

I just wondered whether the checks might have been implemented for vector types as well since Clang features vector extensions for the C language.


>> OpenCL as a language is a modified C99, which does have, amongst a few other things, support for vector types for basic types (char, short, int, long and their unsigned variants as well as floating point types half, float and double). 
>> 
>> So, there is probably some work required to implement this for OpenCL's native vector support. I haven't looked at the code, so can't say if there's any particular difficulty in this particular case.

I will have a look then. In general, is there any interest to lift the UBSan implementation to include checks for vector types, even if they are not part of the C language?

Thanks,

Moritz


More information about the llvm-dev mailing list