Skip to content

Conversation

@kripken
Copy link
Member

@kripken kripken commented Dec 6, 2023

Move some to other when they are really just testing a libc method. Mark others
as wasm2js-only when they seem like they test bit operations or other things
that wasm2js needs coverage for (in multiple opt levels).

Remove test_getgep as it was just testing trivial struct operations that have
lots of other coverage (and it doesn't even test LLVM getelementptr directly).

@kripken kripken requested a review from sbc100 December 6, 2023 19:50
self.do_runf('core/test_fcvt.cpp')

def test_llrint(self):
self.do_runf('core/test_llrint.c')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move the source files and the .out files into other and use do_other_test here.

If you just use do_runf it doesn't look for an .out file.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, done.

@sbc100
Copy link
Collaborator

sbc100 commented Dec 6, 2023

Is there ever a risk that these math function behave differently undef different opt levels.

@kripken
Copy link
Member Author

kripken commented Dec 6, 2023

Is there ever a risk that these math function behave differently undef different opt levels.

The ones implemented in libc should not, except if the binaryen optimizer or wasm2js affect them. For that reason I left some as only_wasm2js (which tests both the optimizer and wasm2js).

But ones that are potentially compiler intrinsics like abs I didn't touch.

@kripken kripken requested a review from sbc100 December 7, 2023 00:54

@only_wasm2js('tests fmodf (which may use JS math)')
def test_math_fmodf(self):
self.do_run_in_out_file_test('math/fmodf.c')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should these tests also be moved in other and run in wasm2js mode? Or do they benefit from being runing at different opt levels of wasm2js?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think these benefit from multiple opt levels, yeah. If we lower fmodf into JS % then the optimizer might do things with that. (However I don't think we actually do so, but it would be nice to someday.)

@kripken kripken merged commit 1e8e824 into main Dec 7, 2023
@kripken kripken deleted the less.mathy branch December 7, 2023 01:08
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.

3 participants