Skip to content

SPIR-V: avoid i65 arithmetic from loop closed forms - #1051

Draft
maleadt wants to merge 1 commit into
mainfrom
tb/spirv-scev-odd-ints
Draft

maleadt wants to merge 1 commit into
mainfrom
tb/spirv-scev-odd-ints

Conversation

@maleadt

@maleadt maleadt commented Oct 21, 2026

Copy link
Copy Markdown
Member

Adds a failing test for #1050: a loop summing 1:n is replaced by its closed form, which ScalarEvolution computes in i65. The LLVM SPIR-V back-end rejects that width, and the Khronos translator crashes on it. #1027 doesn't change this, because BinomialCoefficient ignores the datalayout's native widths.

The fix still needs to be written. This PR is a draft until then.

ScalarEvolution computes the closed form of a summing loop at 65 bits,
which neither SPIR-V back-end accepts (#1050). The test fails until the
odd-width arithmetic is legalized or avoided.
@maleadt
maleadt force-pushed the tb/spirv-scev-odd-ints branch from 1dfc2e6 to 930a994 Compare October 26, 2026 13:23
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.

1 participant