Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Add tests for value_diff_ptr_index pass #2244

Merged
merged 2 commits into from
Apr 4, 2021
Merged

Conversation

k-ye
Copy link
Member

@k-ye k-ye commented Apr 3, 2021

Related issue = #2193

A preliminary step before adding some tests for alias analysis.

[Click here for the format server]


@k-ye k-ye requested a review from taichi-gardener April 3, 2021 09:31
@k-ye k-ye requested review from xumingkuan and BillXu2000 April 3, 2021 09:35
Copy link
Contributor

@xumingkuan xumingkuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

tests/cpp_new/analysis/value_diff_test.cpp Show resolved Hide resolved
Comment on lines 26 to 30
auto *const1 = builder.get_float32(1.0f);
auto *const2 = builder.get_float32(1.0f);

const auto diff = value_diff_ptr_index(const1, const2);
EXPECT_FALSE(diff.is_diff_certain);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't check floating-point numbers since the pass is for pointer indices. Maybe add some comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@k-ye k-ye merged commit b99122a into taichi-dev:master Apr 4, 2021
@k-ye k-ye deleted the vdp-test branch April 4, 2021 00:09
@xumingkuan xumingkuan mentioned this pull request Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants