This is an archive of the discontinued LLVM Phabricator instance.

[X86] Always check the size of SourceTy before getting the next type
ClosedPublic

Authored by pengfei on Sep 19 2021, 7:44 AM.

Details

Summary

D109607 results in a regression in llvm-test-suite.
The reason is we didn't check the size of SourceTy, so that we will
return wrong SSE type when SourceTy is overlapped.

Diff Detail

Event Timeline

pengfei requested review of this revision.Sep 19 2021, 7:44 AM
pengfei created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 19 2021, 7:44 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

I'm wondering whether the test case is required or not for this patch. Reasons:

  1. We have a test in llvm-test-suite can cover this and the test is just a snippet of it;
  2. The test case can not reflect the direct effect of this change;
  3. There're many variables in IR which may be easily affected by unrelated changes, which is annoying to others.

What do you think?

lebedev.ri added inline comments.
clang/test/CodeGen/X86/va-arg-sse.c
2

Please don't use -O* in clang irgen tests.
This should *only* test what IR is produced by clang itself.

What do you think?

The test-suite is an end-to-end/integration test while tests monorepository are unit/regression tests. They have different purposes.
(Personally, I would prefer to reduce the amount of unit/regression testing that can already be covered by the test-suite, but that would be a bigger story)

clang/test/CodeGen/X86/va-arg-sse.c
2

I agree here, testing -O* output will break easily with any unrelated change in LLVM.

pengfei updated this revision to Diff 373581.Sep 20 2021, 7:11 AM
pengfei marked 2 inline comments as done.

Address review comments.

Thanks Roman and Michael.

pengfei added inline comments.Sep 20 2021, 7:12 AM
clang/test/CodeGen/X86/va-arg-sse.c
2

You are right. The test case looks more clear now.

This revision is now accepted and ready to land.Sep 20 2021, 7:45 AM
This revision was landed with ongoing or failed builds.Sep 20 2021, 8:34 AM
This revision was automatically updated to reflect the committed changes.