-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix sse tests with -mnontrapping-fptoint
#22893
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6511,12 +6511,16 @@ def test_neon_wasm_simd(self): | |
| @requires_native_clang | ||
| @no_safe_heap('has unaligned 64-bit operations in wasm') | ||
| @no_ubsan('test contains UB') | ||
| def test_sse1(self): | ||
| @parameterized({ | ||
| '': ([],), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and here (same as below) |
||
| 'nontrapping': (['-mnontrapping-fptoint'],) | ||
| }) | ||
| def test_sse1(self, args): | ||
| src = test_file('sse/test_sse1.cpp') | ||
| self.run_process([shared.CLANG_CXX, src, '-msse', '-o', 'test_sse1', '-D_CRT_SECURE_NO_WARNINGS=1'] + clang_native.get_clang_native_args(), stdout=PIPE) | ||
| native_result = self.run_process('./test_sse1', stdout=PIPE).stdout | ||
|
|
||
| self.emcc_args += ['-I' + test_file('sse'), '-msse'] | ||
| self.emcc_args += ['-I' + test_file('sse'), '-msse'] + args | ||
| self.maybe_closure() | ||
|
|
||
| self.do_runf(src, native_result) | ||
|
|
@@ -6528,14 +6532,18 @@ def test_sse1(self): | |
| @is_slow_test | ||
| @no_ubsan('https://github.com/emscripten-core/emscripten/issues/19688') | ||
| @no_asan('local count too large') | ||
| def test_sse2(self): | ||
| @parameterized({ | ||
| '': ([],), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's make this an explicit `-mno-nontrapping-fptoint' so that when we flip the default, it will still be testing the same case.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think maybe better to explicitly change these tests when we make that change, since the variant will want to be renamed so the default is still empty string and the non-default becomes perhaps
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or we could just name both variants I guess.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm kind keen on the idea of always having an unnamed variant for the default. Then there is always a test you can run that matches the name of the test in python. i.e. if I see
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have other tests here like |
||
| 'nontrapping': (['-mnontrapping-fptoint'],) | ||
| }) | ||
| def test_sse2(self, args): | ||
| if self.is_wasm64(): | ||
| self.require_node_canary() | ||
| src = test_file('sse/test_sse2.cpp') | ||
| self.run_process([shared.CLANG_CXX, src, '-msse2', '-Wno-argument-outside-range', '-o', 'test_sse2', '-D_CRT_SECURE_NO_WARNINGS=1'] + clang_native.get_clang_native_args(), stdout=PIPE) | ||
| native_result = self.run_process('./test_sse2', stdout=PIPE).stdout | ||
|
|
||
| self.emcc_args += ['-I' + test_file('sse'), '-msse2', '-Wno-argument-outside-range', '-sSTACK_SIZE=1MB'] | ||
| self.emcc_args += ['-I' + test_file('sse'), '-msse2', '-Wno-argument-outside-range', '-sSTACK_SIZE=1MB'] + args | ||
| self.maybe_closure() | ||
| self.do_runf(src, native_result) | ||
|
|
||
|
|
@@ -6587,8 +6595,8 @@ def test_sse4_1(self): | |
| @wasm_simd | ||
| @requires_native_clang | ||
| @parameterized({ | ||
| '': (False,), | ||
| '2': (True,) | ||
| '': (False,), | ||
| '2': (True,) | ||
| }) | ||
| def test_sse4(self, use_4_2): | ||
| msse4 = '-msse4.2' if use_4_2 else '-msse4' | ||
|
|
@@ -6606,12 +6614,16 @@ def test_sse4(self, use_4_2): | |
| @is_slow_test | ||
| @no_asan('local count too large') | ||
| @no_ubsan('local count too large') | ||
| def test_avx(self): | ||
| @parameterized({ | ||
| '': ([],), | ||
| 'nontrapping': (['-mnontrapping-fptoint'],) | ||
| }) | ||
| def test_avx(self, args): | ||
| src = test_file('sse/test_avx.cpp') | ||
| self.run_process([shared.CLANG_CXX, src, '-mavx', '-Wno-argument-outside-range', '-Wpedantic', '-o', 'test_avx', '-D_CRT_SECURE_NO_WARNINGS=1'] + clang_native.get_clang_native_args(), stdout=PIPE) | ||
| native_result = self.run_process('./test_avx', stdout=PIPE).stdout | ||
|
|
||
| self.emcc_args += ['-I' + test_file('sse'), '-mavx', '-Wno-argument-outside-range', '-sSTACK_SIZE=1MB'] | ||
| self.emcc_args += ['-I' + test_file('sse'), '-mavx', '-Wno-argument-outside-range', '-sSTACK_SIZE=1MB'] + args | ||
| self.maybe_closure() | ||
| self.do_runf(src, native_result) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.