davide added a comment. Just one thing: I don't know AMDGPU target at all. I think the changes there are correct but I'd be happier if Tom or Matt can sign-off the AMDGPU specific bits of this patch. Repository: rL LLVM http://reviews.llvm.org/D16269