Skip to content

Commit

Permalink
[herd]: Optimise SVE predicate regsiters.
Browse files Browse the repository at this point in the history
The `PTRUE` instruction now transmits stored value
to semantic-time environement.

As a result, predicated instructions may sometimes
decide whether to access or not at semantic-time, leading to
a dramatic decrease of execution candidates number.
  • Loading branch information
maranget authored and Vladimir Murzin committed May 2, 2024
1 parent 3872e78 commit 7b20aeb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions herd/AArch64Sem.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2323,7 +2323,7 @@ module Make
else M.unitT old_val
in
repeat V.zero 0 >>= fun (new_val) ->
write_reg_predicate p new_val ii
write_reg_predicate p new_val ii >>! new_val

let mov_sv r k shift ii =
let open AArch64Base in
Expand Down Expand Up @@ -3265,7 +3265,8 @@ module Make
M.unitT ())
| I_PTRUE(p,pattern) ->
check_sve inst;
!(ptrue p pattern ii)
ptrue p pattern ii
>>= nextSet p
| I_WHILELT(p,var,r1,r2) ->
check_sve inst;
!!(while_op (M.op Op.Lt) false p var r1 r2 ii)
Expand Down

0 comments on commit 7b20aeb

Please sign in to comment.