From 1c2f240908d2fc0d2707dd8eb2f5bc9f5ff798e3 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Thu, 20 Oct 2016 00:10:34 +0000 Subject: [PATCH] [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284677 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/WebAssembly/load-store-i1.ll | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/CodeGen/WebAssembly/load-store-i1.ll b/test/CodeGen/WebAssembly/load-store-i1.ll index 4921a739ea0..ea0ec717c7a 100644 --- a/test/CodeGen/WebAssembly/load-store-i1.ll +++ b/test/CodeGen/WebAssembly/load-store-i1.ll @@ -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