Set Ready For Review
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// riscv64/rva20u64:"SRLI [$]63," "ANDI [$]1," "BNEZ" -"MOV [$]"```suggestion
// riscv64/rva20u64,riscv64/rva22u64:"SRLI [$]63," "ANDI [$]1," "BNEZ" -"MOV [$]"
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// riscv64/rva20u64:"SRLI [$]63," "ANDI [$]1," "BNEZ" -"MOV [$]"```suggestion
// riscv64/rva20u64,riscv64/rva22u64:"SRLI [$]63," "ANDI [$]1," "BNEZ" -"MOV [$]"
```
This does not work as expected - the first entry is silently ignored and only the second entry is tested... I started fixing this, however it's a non-trivial amount of effort, which I'll pick up again at some point.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
(ANDI [1] (SRLI [c] x)) && buildcfg.GORISCV64 >= 23 => (BEXTI [c] x)Do we need more a rule about `(ANDI [1] (SRLIW [c] x)) && buildcfg.GORISCV64 >= 23 => (BEXTI [c] x)` ?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
(B(EQ|NE)Z (ANDI [1] (SRLW x y)) yes no) && buildcfg.GORISCV64 >= 23 => (B(EQ|NE)Z (BEXT <typ.UInt64> x (ANDI <typ.UInt64> [31] y)) yes no)I'm not sure this rule is worth it as we end up with the same number of instructions, and actually more bytes. Here's what I get with this rule
```
bits.go:343 0x11b29 01f57493 ANDI $31, X10, X9
bits.go:343 0x11b2d 4895d4b3 BEXT X9, X11, X9
bits.go:343 0x11b31 00048463 BEQZ X9, 2(PC)
```
and without
```
bits.go:343 0x11b3b 00a5d4bb SRLW X10, X11, X9
bits.go:343 0x11b3f 8588 ANDI $1, X9, X9
bits.go:343 0x11b41 00048463 BEQZ X9, 2(PC)
```
I hacked the function to remove the first check so the line numbers aren't correct.
// riscv64/rva23u64:"ANDI [$]31," "BEXT" "BEQZ" -"SRL" -"AND "I think there's a space missing after the BEXT instruction, i.e., we've got
"BEXT"
but we want
"BEXT "
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
(ANDI [1] (SRLI [c] x)) && buildcfg.GORISCV64 >= 23 => (BEXTI [c] x)Joel SingDo we need more a rule about `(ANDI [1] (SRLIW [c] x)) && buildcfg.GORISCV64 >= 23 => (BEXTI [c] x)` ?
Good call.
(B(EQ|NE)Z (ANDI [1] (SRLW x y)) yes no) && buildcfg.GORISCV64 >= 23 => (B(EQ|NE)Z (BEXT <typ.UInt64> x (ANDI <typ.UInt64> [31] y)) yes no)I'm not sure this rule is worth it as we end up with the same number of instructions, and actually more bytes. Here's what I get with this rule
```
bits.go:343 0x11b29 01f57493 ANDI $31, X10, X9
bits.go:343 0x11b2d 4895d4b3 BEXT X9, X11, X9
bits.go:343 0x11b31 00048463 BEQZ X9, 2(PC)
```and without
```
bits.go:343 0x11b3b 00a5d4bb SRLW X10, X11, X9
bits.go:343 0x11b3f 8588 ANDI $1, X9, X9
bits.go:343 0x11b41 00048463 BEQZ X9, 2(PC)
```I hacked the function to remove the first check so the line numbers aren't correct.
Fair - there is a small possibility that the ANDI can be eliminated, but not guaranteed. This also points out that we can optimise register based shifts more broadly - have raised https://go-review.googlesource.com/c/go/+/849005 for this (although I don't seem to be able to add you as a reviewer currently).
// riscv64/rva23u64:"ANDI [$]31," "BEXT" "BEQZ" -"SRL" -"AND "I think there's a space missing after the BEXT instruction, i.e., we've got
"BEXT"
but we want
"BEXT "
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
(SNEZ (ANDI [1] (SRLI [c] x))) && buildcfg.GORISCV64 >= 23 => (BEXTI [c] x)This rule will never be triggered since it was covered by CL 849005
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
(SNEZ (ANDI [1] (SRLI [c] x))) && buildcfg.GORISCV64 >= 23 => (BEXTI [c] x)This rule will never be triggered since it was covered by CL 849005
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |