Skip to content

Commit

Permalink
riscv64: Clarify sinkable loads on RISC-V
Browse files Browse the repository at this point in the history
  • Loading branch information
afonso360 committed Jun 11, 2024
1 parent f52b35a commit 50e8dd3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cranelift/codegen/src/isa/riscv64/inst.isle
Original file line number Diff line number Diff line change
Expand Up @@ -2424,6 +2424,11 @@

;; Helpers for sinkable loads ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; RISC-V doesen't really have sinkable loads. But the regular load instructions
;; sign / zero extend their results to 64 bits. So we can pretend they are
;; an extend instruction with a sinkable load. This allows us to have better
;; lowerings on these cases.

;; Extract a sinkable instruction from a value operand.
(decl sinkable_inst (Inst) Value)
(extern extractor sinkable_inst sinkable_inst)
Expand Down

0 comments on commit 50e8dd3

Please sign in to comment.