Skip to content

Fix mem-mode crashing with floating point literals#14

Merged
Mittagskogel merged 4 commits into
RIKEN-RCCS:developfrom
MinliLiao:mem-mode-literal-param
Jun 23, 2026
Merged

Fix mem-mode crashing with floating point literals#14
Mittagskogel merged 4 commits into
RIKEN-RCCS:developfrom
MinliLiao:mem-mode-literal-param

Conversation

@MinliLiao

Copy link
Copy Markdown
Collaborator

While intrinsics work fine, mem-mode crashes when floating point literals are used as input parameters to truncated functions. An explicitly truncated function (created through __raptor_truncate_mem_func()) requires its input parameters truncated manually through __raptor_truncate_mem_value(), which does not have a problem with floating point literals, but functions truncated due to being transitively called by explicitly truncated functions cannot work around this problem with manual truncation.

This pull request fixes this problem by automatically creating a new truncated variable for literal inputs of truncated function transitively called by explicitly truncated ones, similar to how intrinsics are handled. Functions that have been explicitly truncated still has to have already truncated variables as input parameters.

This pull request also adds a manually constructed test case for this in the test/Unit/Truncate/const.ll.

@MinliLiao MinliLiao force-pushed the mem-mode-literal-param branch from d6d2021 to ac70aa7 Compare June 23, 2026 07:09
@Mittagskogel Mittagskogel marked this pull request as ready for review June 23, 2026 07:51
@Mittagskogel Mittagskogel merged commit c0db30a into RIKEN-RCCS:develop Jun 23, 2026
5 checks passed
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