Skip to content

feat(riscv): add Zicond integer conditional operations#899

Open
regehr wants to merge 3 commits into
mainfrom
regehr/zicond
Open

feat(riscv): add Zicond integer conditional operations#899
regehr wants to merge 3 commits into
mainfrom
regehr/zicond

Conversation

@regehr

@regehr regehr commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

regehr and others added 2 commits June 19, 2026 08:47
Adds the two RISC-V Zicond R-type instructions to the riscv dialect:
czero.eqz and czero.nez (spelled riscv.czeroeqz / riscv.czeronez,
following the dot-collapsing convention used by orcb / rev8).

Covers opcodes, register-level semantics and lemmas, interpreter,
verifier, an identity round-trip, and interpreter tests that pin down
the eqz/nez semantics via a non-commutative shift.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@regehr regehr requested a review from luisacicolini June 19, 2026 14:53

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

VeIR Benchmarks

Details
Benchmark suite Current: a765d7f Previous: cc0b571 Ratio
add-fold-worklist/create 2414000 ns (± 46519) 2245000 ns (± 59823) 1.08
add-fold-worklist/rewrite 4000000 ns (± 57335) 3943000 ns (± 62416) 1.01
add-fold-worklist-local/create 2412000 ns (± 101083) 2268000 ns (± 50000) 1.06
add-fold-worklist-local/rewrite 3505000 ns (± 166840) 3319000 ns (± 31736) 1.06
add-zero-worklist/create 2343000 ns (± 113602) 2235000 ns (± 108232) 1.05
add-zero-worklist/rewrite 2889500 ns (± 140164) 2508000 ns (± 31572) 1.15
add-zero-reuse-worklist/create 2007500 ns (± 121571) 1834000 ns (± 90486) 1.09
add-zero-reuse-worklist/rewrite 2315500 ns (± 116500) 2108000 ns (± 32722) 1.10
mul-two-worklist/create 2376000 ns (± 102619) 2248000 ns (± 109222) 1.06
mul-two-worklist/rewrite 5792000 ns (± 82830) 5544500 ns (± 143297) 1.04
add-fold-forwards/create 2286500 ns (± 128711) 2205000 ns (± 111151) 1.04
add-fold-forwards/rewrite 3059000 ns (± 59492) 2998000 ns (± 62583) 1.02
add-zero-forwards/create 2251500 ns (± 109969) 2291000 ns (± 81627) 0.98
add-zero-forwards/rewrite 1992500 ns (± 44188) 1903000 ns (± 92249) 1.05
add-zero-reuse-forwards/create 1937000 ns (± 95744) 1866500 ns (± 87239) 1.04
add-zero-reuse-forwards/rewrite 1542000 ns (± 37673) 1562000 ns (± 24410) 0.99
mul-two-forwards/create 2203000 ns (± 43397) 2189000 ns (± 55971) 1.01
mul-two-forwards/rewrite 3665000 ns (± 42705) 3612000 ns (± 88471) 1.01
add-zero-reuse-first/create 1917500 ns (± 107179) 1862000 ns (± 71721) 1.03
add-zero-reuse-first/rewrite 8000 ns (± 2218) 8000 ns (± 2593) 1
add-zero-lots-of-reuse-first/create 1999000 ns (± 104060) 1815000 ns (± 64825) 1.10
add-zero-lots-of-reuse-first/rewrite 830000 ns (± 27070) 785000 ns (± 22749) 1.06

This comment was automatically generated by workflow using github-action-benchmark.

@tobiasgrosser tobiasgrosser left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice. Let's see what @luisacicolini is saying.

@tobiasgrosser tobiasgrosser added the RISCV The RISCV Dialect label Jun 22, 2026

@luisacicolini luisacicolini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RISCV The RISCV Dialect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants