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

Check preconditions #31

Merged
merged 2 commits into from
Aug 26, 2024
Merged

Check preconditions #31

merged 2 commits into from
Aug 26, 2024

Conversation

mattkretz
Copy link
Owner

No description provided.

@mattkretz mattkretz added the enhancement New feature or request label Aug 26, 2024
@mattkretz mattkretz added this to the v0.4.0 milestone Aug 26, 2024
@mattkretz mattkretz self-assigned this Aug 26, 2024
For now only the existing `invoke_ub` were converted to use it.

This is only enabled starting from GCC 10 as GCC 9 seems to fail
preconditions at compile-time where it should not.

ChangeLog:

	* README.md: Document VIR_CHECK_PRECONDITIONS.
	* testsuite/tests/mask_reductions.cc: Guard function calls with
	precondition behind constexpr-if.
	* vir/simd.h (detail::unreachable): New / moved from
	simd_execution.h.
	(detail::trap): New.
	(detail::invoke_ub): Moved up with behavior dependent on
	VIR_CHECK_PRECONDITIONS.
	(vir_simd_precondition): New macro.
	(simd, simd_mask): Replace invoke_ub with vir_simd_precondition.
	* vir/simd_execution.h (detail::unreachable): Moved to simd.h.
ChangeLog:

	* .github/workflows/CI.yml: Add 10 and 12 to the GCC matrix.
@mattkretz mattkretz merged commit 319ffa2 into master Aug 26, 2024
13 checks passed
@mattkretz mattkretz deleted the check_preconditions branch August 26, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant