This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Remove the lax warning for explicit casts
ClosedPublic

Authored by maryammo on Jan 20 2023, 7:58 AM.

Details

Summary

This patch is to remove the erroneous lax vector conversion warning for CStyle; explicit; casts
that was added as part of D126540.

Diff Detail

Event Timeline

maryammo created this revision.Jan 20 2023, 7:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2023, 7:58 AM
maryammo requested review of this revision.Jan 20 2023, 7:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2023, 7:58 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
nemanjai accepted this revision.Jan 20 2023, 8:38 AM

LGTM other than the missing template test.

clang/test/Parser/lax-conv.cpp
5

Can you also add one template test?

template <typename VEC> VEC __attribute__((noinline)) test(vector unsigned char a, vector unsigned char b) {
  return (VEC)(a * b);
}

vector unsigned char test1(vector unsigned char a, vector unsigned char b) {
  return test<vector unsigned char>(a, b);
}

vector unsigned long long test2(vector unsigned char a, vector unsigned char b) {
  return test<vector unsigned long long>(a, b);
}
This revision is now accepted and ready to land.Jan 20 2023, 8:38 AM
maryammo updated this revision to Diff 490895.Jan 20 2023, 9:39 AM

Adding test for template

This revision was landed with ongoing or failed builds.Jan 20 2023, 12:24 PM
This revision was automatically updated to reflect the committed changes.