forked from OSchip/llvm-project
WebAssembly: NFC rename shr/sar
Renamed from: https://github.com/WebAssembly/design/pull/332 llvm-svn: 247028
This commit is contained in:
parent
25425ad920
commit
749ed88aa5
|
@ -23,8 +23,8 @@ defm AND : BinaryInt<and>;
|
|||
defm IOR : BinaryInt<or>;
|
||||
defm XOR : BinaryInt<xor>;
|
||||
defm SHL : BinaryInt<shl>;
|
||||
defm SHR : BinaryInt<srl>;
|
||||
defm SAR : BinaryInt<sra>;
|
||||
defm SHR_U : BinaryInt<srl>;
|
||||
defm SHR_S : BinaryInt<sra>;
|
||||
|
||||
defm EQ : ComparisonInt<SETEQ>;
|
||||
defm NE : ComparisonInt<SETNE>;
|
||||
|
|
|
@ -134,7 +134,7 @@ define i32 @shl32(i32 %x, i32 %y) {
|
|||
; CHECK-NEXT: (param i32) (param i32) (result i32)
|
||||
; CHECK-NEXT: (setlocal @0 (argument 1))
|
||||
; CHECK-NEXT: (setlocal @1 (argument 0))
|
||||
; CHECK-NEXT: (setlocal @2 (shr @1 @0))
|
||||
; CHECK-NEXT: (setlocal @2 (shr_u @1 @0))
|
||||
; CHECK-NEXT: (return @2)
|
||||
define i32 @shr32(i32 %x, i32 %y) {
|
||||
%a = lshr i32 %x, %y
|
||||
|
@ -145,7 +145,7 @@ define i32 @shr32(i32 %x, i32 %y) {
|
|||
; CHECK-NEXT: (param i32) (param i32) (result i32)
|
||||
; CHECK-NEXT: (setlocal @0 (argument 1))
|
||||
; CHECK-NEXT: (setlocal @1 (argument 0))
|
||||
; CHECK-NEXT: (setlocal @2 (sar @1 @0))
|
||||
; CHECK-NEXT: (setlocal @2 (shr_s @1 @0))
|
||||
; CHECK-NEXT: (return @2)
|
||||
define i32 @sar32(i32 %x, i32 %y) {
|
||||
%a = ashr i32 %x, %y
|
||||
|
|
|
@ -134,7 +134,7 @@ define i64 @shl64(i64 %x, i64 %y) {
|
|||
; CHECK-NEXT: (param i64) (param i64) (result i64)
|
||||
; CHECK-NEXT: (setlocal @0 (argument 1))
|
||||
; CHECK-NEXT: (setlocal @1 (argument 0))
|
||||
; CHECK-NEXT: (setlocal @2 (shr @1 @0))
|
||||
; CHECK-NEXT: (setlocal @2 (shr_u @1 @0))
|
||||
; CHECK-NEXT: (return @2)
|
||||
define i64 @shr64(i64 %x, i64 %y) {
|
||||
%a = lshr i64 %x, %y
|
||||
|
@ -145,7 +145,7 @@ define i64 @shr64(i64 %x, i64 %y) {
|
|||
; CHECK-NEXT: (param i64) (param i64) (result i64)
|
||||
; CHECK-NEXT: (setlocal @0 (argument 1))
|
||||
; CHECK-NEXT: (setlocal @1 (argument 0))
|
||||
; CHECK-NEXT: (setlocal @2 (sar @1 @0))
|
||||
; CHECK-NEXT: (setlocal @2 (shr_s @1 @0))
|
||||
; CHECK-NEXT: (return @2)
|
||||
define i64 @sar64(i64 %x, i64 %y) {
|
||||
%a = ashr i64 %x, %y
|
||||
|
|
|
@ -18,7 +18,7 @@ define i32 @load_unsigned_i1_i32(i1* %p) {
|
|||
; CHECK: (setlocal @1 (load_zx_i8_i32 @0))
|
||||
; CHECK-NEXT: (setlocal @2 (immediate 31))
|
||||
; CHECK-NEXT: (setlocal @3 (shl @1 @2))
|
||||
; CHECK-NEXT: (setlocal @4 (sar @3 @2))
|
||||
; CHECK-NEXT: (setlocal @4 (shr_s @3 @2))
|
||||
; CHECK-NEXT: (return @4)
|
||||
define i32 @load_signed_i1_i32(i1* %p) {
|
||||
%v = load i1, i1* %p
|
||||
|
@ -39,7 +39,7 @@ define i64 @load_unsigned_i1_i64(i1* %p) {
|
|||
; CHECK: (setlocal @1 (load_zx_i8_i64 @0))
|
||||
; CHECK-NEXT: (setlocal @2 (immediate 63))
|
||||
; CHECK-NEXT: (setlocal @3 (shl @1 @2))
|
||||
; CHECK-NEXT: (setlocal @4 (sar @3 @2))
|
||||
; CHECK-NEXT: (setlocal @4 (shr_s @3 @2))
|
||||
; CHECK-NEXT: (return @4)
|
||||
define i64 @load_signed_i1_i64(i1* %p) {
|
||||
%v = load i1, i1* %p
|
||||
|
|
Loading…
Reference in New Issue