Unverified Commit 89c7ce75 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

Legalize neg: -x becomes 0 - x (#2128) (#2145)

This fixes an error with negating a negative SInt literal and a
[debatable] lint warning in Verilator when negating any value.

This behavior matches that of Chisel (which directly emits the 0 - x
already).

(cherry picked from commit 49b82324

)

Co-authored-by: default avatarJack Koenig <koenig@sifive.com>
parent fdf2740d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment