[PATCH] D19381: Extend load/store type canonicalization to handle unordered operations

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 23 12:46:54 PDT 2016


chandlerc added a comment.

In http://reviews.llvm.org/D19381#409561, @jfb wrote:

> In http://reviews.llvm.org/D19381#409535, @reames wrote:
>
> > This landed as 267210.
> >
> > @JF - There shouldn't be any code generation differences for two types with the same alignment, even if that alignment isn't natural.
>
>
> Many ISAs have different load / store instructions for FP versus integer, and some behave differently. Going from FP to integer in this case (no intervening use) seems fine, but I do think it's likely to change code generation (unless the backend already performed the same transformation).


The patch is good of course, but I think JF is onto something here. Specifically, it would be good to make sure that backends which implement reasonable lowering for under-aligned atomic load and store of an integer also reasonably lower under-aligned atomic load and store of a floating point value. And the same for pointers.

I'm worried there are targets that have never had anyone test their ability to lower a 1-byte aligned atomic float or atomic pointer, and will need to be updated in the face of this.


http://reviews.llvm.org/D19381





More information about the llvm-commits mailing list