devin.jeanpierre added a comment.

The core difference of behavior is this, in the logic for setting 
`canPassInRegisters`:

  // Clang <= 4 used the pre-C++11 rule, which ignores move operations.
  // The PS4 platform ABI follows the behavior of Clang 3.2.
  if (CCK == TargetInfo::CCK_ClangABI4OrPS4)
    return !D->hasNonTrivialDestructorForCall() &&
           !D->hasNonTrivialCopyConstructorForCall();

This is noticeably different from the non-PS4 behavior: not only does it ignore 
the move constructor, but it also does not require that a copy constructor or 
destructor even exist. And so all of the broken tests are structs where the 
copy constructor is deleted and the destructor is either trivial or deleted. On 
non-`CCK_ClangABI4OrPS4`, it is not passable in registers, but on 
`CCK_ClangABI4OrPS4` it is.

Related, but separate: DR1734, which is the same thing, but for 
`std::is_trivially_copyable`.

I believe the fix here, like for Windows, is to special-case this platform in 
the test. (Or delete these tests.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114732/new/

https://reviews.llvm.org/D114732

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to