[Sema] Support lax conversions for compound assignments

Support lax convertions on compound assignment expressions like:

  typedef __attribute__((vector_size(8))) double float64x1_t;
  typedef __attribute__((vector_size(16))) double float64x2_t;
  float64x1_t vget_low_f64(float64x2_t __p0);

  double c = 3.0;
  float64x2_t v = {0.0, 1.0};
  c += vget_low_f64(v);

This restores one more valid behavior pre r266366, and is a incremental
follow up from work committed in r274646.

While here, make the check more strict, add FIXMEs, clean up variable
names to match what they can actually be and update testcases to reflect
that. We now reject:

  typedef float float2 __attribute__ ((vector_size (8)));
  double d;
  f2 += d;

which doesn't fit as a direct bitcast anyway.

Differential Revision: https://reviews.llvm.org/D24472

rdar://problem/28033929

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282968 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 182698b1da5c8592a2e19ffca43aab824044eca5)
2 files changed