Skip to content

feat(riscv): select riscv.andn, riscv.orn, riscv.xnor#901

Open
regehr wants to merge 2 commits into
mainfrom
regehr/some-zbb
Open

feat(riscv): select riscv.andn, riscv.orn, riscv.xnor#901
regehr wants to merge 2 commits into
mainfrom
regehr/some-zbb

Conversation

@regehr

@regehr regehr commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

a few little things to note about this:

  • I noticed that the unrealized conversion casts were making the code annoying so I made some helpers to add those with less boilerplate
  • since the LLVM dialect code has passed our verifier, checking only one of (input1, input2, result) for width 64 suffices
  • I moved our existing matchNot function to a shared file. note that it already expected the literal constant to be on the RHS, even before we had a canonicalizer

@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: c9e45ea Previous: cc0b571 Ratio
add-fold-worklist/create 2214000 ns (± 59245) 2245000 ns (± 59823) 0.99
add-fold-worklist/rewrite 4038000 ns (± 73583) 3943000 ns (± 62416) 1.02
add-fold-worklist-local/create 2147000 ns (± 80041) 2268000 ns (± 50000) 0.95
add-fold-worklist-local/rewrite 3294000 ns (± 95051) 3319000 ns (± 31736) 0.99
add-zero-worklist/create 2186000 ns (± 46408) 2235000 ns (± 108232) 0.98
add-zero-worklist/rewrite 2576000 ns (± 38940) 2508000 ns (± 31572) 1.03
add-zero-reuse-worklist/create 1823000 ns (± 89461) 1834000 ns (± 90486) 0.99
add-zero-reuse-worklist/rewrite 2136000 ns (± 36874) 2108000 ns (± 32722) 1.01
mul-two-worklist/create 2230000 ns (± 111447) 2248000 ns (± 109222) 0.99
mul-two-worklist/rewrite 5593000 ns (± 128558) 5544500 ns (± 143297) 1.01
add-fold-forwards/create 2205000 ns (± 57057) 2205000 ns (± 111151) 1
add-fold-forwards/rewrite 2981000 ns (± 47648) 2998000 ns (± 62583) 0.99
add-zero-forwards/create 2190000 ns (± 90386) 2291000 ns (± 81627) 0.96
add-zero-forwards/rewrite 1961000 ns (± 35682) 1903000 ns (± 92249) 1.03
add-zero-reuse-forwards/create 1861500 ns (± 92806) 1866500 ns (± 87239) 1.00
add-zero-reuse-forwards/rewrite 1569500 ns (± 45139) 1562000 ns (± 24410) 1.00
mul-two-forwards/create 2121000 ns (± 58845) 2189000 ns (± 55971) 0.97
mul-two-forwards/rewrite 3641000 ns (± 34113) 3612000 ns (± 88471) 1.01
add-zero-reuse-first/create 1841000 ns (± 79588) 1862000 ns (± 71721) 0.99
add-zero-reuse-first/rewrite 8000 ns (± 2644) 8000 ns (± 2593) 1
add-zero-lots-of-reuse-first/create 1899000 ns (± 36062) 1815000 ns (± 64825) 1.05
add-zero-lots-of-reuse-first/rewrite 802000 ns (± 16574) 785000 ns (± 22749) 1.02

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

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