[llvm] r284677 - [WebAssembly] Update extending load test for new i1 behavior
Derek Schuff via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 19 17:10:34 PDT 2016
Author: dschuff
Date: Wed Oct 19 19:10:34 2016
New Revision: 284677
URL: http://llvm.org/viewvc/llvm-project?rev=284677&view=rev
Log:
[WebAssembly] Update extending load test for new i1 behavior
r284611 changed the behavior of the DAG legalizer for sign-extending i1
values. Update the wasm extending load test to match.
Modified:
llvm/trunk/test/CodeGen/WebAssembly/load-store-i1.ll
Modified: llvm/trunk/test/CodeGen/WebAssembly/load-store-i1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WebAssembly/load-store-i1.ll?rev=284677&r1=284676&r2=284677&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/load-store-i1.ll (original)
+++ llvm/trunk/test/CodeGen/WebAssembly/load-store-i1.ll Wed Oct 19 19:10:34 2016
@@ -15,12 +15,12 @@ define i32 @load_u_i1_i32(i1* %p) {
}
; CHECK-LABEL: load_s_i1_i32:
-; CHECK: i32.load8_u $push[[NUM0:[0-9]+]]=, 0($0){{$}}
-; CHECK-NEXT: i32.const $push[[NUM1:[0-9]+]]=, 31{{$}}
-; CHECK-NEXT: shl $push[[NUM2:[0-9]+]]=, $pop[[NUM0]], $pop[[NUM1]]{{$}}
-; CHECK-NEXT: i32.const $push[[NUM4:[0-9]+]]=, 31{{$}}
-; CHECK-NEXT: shr_s $push[[NUM3:[0-9]+]]=, $pop[[NUM2]], $pop[[NUM4]]{{$}}
-; CHECK-NEXT: return $pop[[NUM3]]{{$}}
+; CHECK: i32.const $push[[NUM3:[0-9]+]]=, 0{{$}}
+; CHECK-NEXT: i32.load8_u $push[[NUM0:[0-9]+]]=, 0($0){{$}}
+; CHECK-NEXT: i32.const $push[[NUM1:[0-9]+]]=, 1{{$}}
+; CHECK-NEXT: i32.and $push[[NUM2:[0-9]+]]=, $pop[[NUM0]], $pop[[NUM1]]{{$}}
+; CHECK-NEXT: i32.sub $push[[NUM4:[0-9]+]]=, $pop[[NUM3]], $pop[[NUM2]]{{$}}
+; CHECK-NEXT: return $pop[[NUM4]]{{$}}
define i32 @load_s_i1_i32(i1* %p) {
%v = load i1, i1* %p
%e = sext i1 %v to i32
@@ -37,12 +37,12 @@ define i64 @load_u_i1_i64(i1* %p) {
}
; CHECK-LABEL: load_s_i1_i64:
-; CHECK: i64.load8_u $push[[NUM0:[0-9]+]]=, 0($0){{$}}
-; CHECK-NEXT: i64.const $push[[NUM1:[0-9]+]]=, 63{{$}}
-; CHECK-NEXT: shl $push[[NUM2:[0-9]+]]=, $pop[[NUM0]], $pop[[NUM1]]{{$}}
-; CHECK-NEXT: i64.const $push[[NUM4:[0-9]+]]=, 63{{$}}
-; CHECK-NEXT: shr_s $push[[NUM3:[0-9]+]]=, $pop[[NUM2]], $pop[[NUM4]]{{$}}
-; CHECK-NEXT: return $pop[[NUM3]]{{$}}
+; CHECK: i64.const $push[[NUM3:[0-9]+]]=, 0{{$}}
+; CHECK-NEXT: i64.load8_u $push[[NUM0:[0-9]+]]=, 0($0){{$}}
+; CHECK-NEXT: i64.const $push[[NUM1:[0-9]+]]=, 1{{$}}
+; CHECK-NEXT: i64.and $push[[NUM2:[0-9]+]]=, $pop[[NUM0]], $pop[[NUM1]]{{$}}
+; CHECK-NEXT: i64.sub $push[[NUM4:[0-9]+]]=, $pop[[NUM3]], $pop[[NUM2]]{{$}}
+; CHECK-NEXT: return $pop[[NUM4]]{{$}}
define i64 @load_s_i1_i64(i1* %p) {
%v = load i1, i1* %p
%e = sext i1 %v to i64
More information about the llvm-commits
mailing list