huhu233 wrote:

> I'll need to look to see if the TBAA metadata we're adding matches what we 
> initially envisaged but my gut feeling matches @arsenm.
> 
> I'm assuming the original code emitted an error, something along the lines of 
> "no version of svst1 available for long long*", which you've "fixed" by 
> introducing a cast that breaks strict aliasing rules.
> 
> I recall warnings relating to strict aliasing violations being hit and miss? 
> but perhaps we can do better.

Hi, @paulwalker-arm, ACLE allows users to do instruction-level development, but 
mixing intrinsic and regular C code may break some of the rules set by the 
compiler. For example, in this case, the explict cast causes `res2` to have 
different tbaa in different contexts. The compiler needs to detect these 
behaviors and provide some hints, or work around them to avoid a series of 
wrong optimizations that follow.

https://github.com/llvm/llvm-project/pull/107793
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to