This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Test case for D149001
ClosedPublic

Authored by floatshadow on Apr 23 2023, 12:18 AM.

Diff Detail

Event Timeline

floatshadow created this revision.Apr 23 2023, 12:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 23 2023, 12:18 AM
floatshadow requested review of this revision.Apr 23 2023, 12:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 23 2023, 12:18 AM

clean diff what junaire proposed

nikic added a subscriber: nikic.Apr 23 2023, 12:52 AM

The tests in this patch should have baseline check lines, i.e. generated using LLVM built without your patch.

The tests in this patch should have baseline check lines, i.e. generated using LLVM built without your patch.

Thank you for you reply! This my first revision and I misunderstood the meaning of "baseline check"

This means I should first update the diff of test IRs in this baseline check revision without my patch, i.e. output IR should be the same as input IR;
then apply my patch to the code and expect we would gain optimizations, i.e. output IR optimized and differ from input IR?
Is this correct?

nikic added a comment.Apr 23 2023, 1:32 AM

The tests in this patch should have baseline check lines, i.e. generated using LLVM built without your patch.

Thank you for you reply! This my first revision and I misunderstood the meaning of "baseline check"

This means I should first update the diff of test IRs in this baseline check revision without my patch, i.e. output IR should be the same as input IR;
then apply my patch to the code and expect we would gain optimizations, i.e. output IR optimized and differ from input IR?
Is this correct?

Yes, exactly!

update baseline check

update vector type positive case, fold sdiv X (Y and 1)

This revision is now accepted and ready to land.Apr 24 2023, 5:27 AM
This revision was landed with ongoing or failed builds.Apr 24 2023, 5:28 AM
This revision was automatically updated to reflect the committed changes.