diff options
Diffstat (limited to 'test/codegen')
| -rw-r--r-- | test/codegen/shift.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/codegen/shift.go b/test/codegen/shift.go index 1c71b0f3ef..7385058726 100644 --- a/test/codegen/shift.go +++ b/test/codegen/shift.go @@ -122,27 +122,41 @@ func rshConst64x32(v int64) int64 { func lshConst32x1Add(x int32) int32 { // amd64:"SHLL\t[$]2" // loong64:"SLL\t[$]2" + // riscv64:"SLLI\t[$]2" return (x + x) << 1 } func lshConst64x1Add(x int64) int64 { // amd64:"SHLQ\t[$]2" // loong64:"SLLV\t[$]2" + // riscv64:"SLLI\t[$]2" return (x + x) << 1 } func lshConst32x2Add(x int32) int32 { // amd64:"SHLL\t[$]3" // loong64:"SLL\t[$]3" + // riscv64:"SLLI\t[$]3" return (x + x) << 2 } func lshConst64x2Add(x int64) int64 { // amd64:"SHLQ\t[$]3" // loong64:"SLLV\t[$]3" + // riscv64:"SLLI\t[$]3" return (x + x) << 2 } +func lshConst32x31Add(x int32) int32 { + // riscv64:-"SLLI","MOV\t[$]0" + return (x + x) << 31 +} + +func lshConst64x63Add(x int64) int64 { + // riscv64:-"SLLI","MOV\t[$]0" + return (x + x) << 63 +} + // ------------------ // // masked shifts // // ------------------ // |
