[PATCH] D48748: [WebAssembly] Convert remaining tests from elf to wasm output
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 28 14:55:22 PDT 2018
sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff.
Repository:
rL LLVM
https://reviews.llvm.org/D48748
Files:
test/CodeGen/WebAssembly/negative-base-reg.ll
test/CodeGen/WebAssembly/offset-fastisel.ll
test/CodeGen/WebAssembly/vector_sdiv.ll
Index: test/CodeGen/WebAssembly/vector_sdiv.ll
===================================================================
--- test/CodeGen/WebAssembly/vector_sdiv.ll
+++ test/CodeGen/WebAssembly/vector_sdiv.ll
@@ -1,7 +1,7 @@
; RUN: llc < %s -asm-verbose=false -fast-isel=false -disable-wasm-fallthrough-return-opt | FileCheck %s
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
-target triple = "wasm32-unknown-unknown-elf"
+target triple = "wasm32-unknown-unknown"
; Because there is a 1 in the vector, sdiv should not be reduced to shifts.
Index: test/CodeGen/WebAssembly/offset-fastisel.ll
===================================================================
--- test/CodeGen/WebAssembly/offset-fastisel.ll
+++ test/CodeGen/WebAssembly/offset-fastisel.ll
@@ -3,7 +3,7 @@
; TODO: Merge this with offset.ll when fast-isel matches better.
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
-target triple = "wasm32-unknown-unknown-elf"
+target triple = "wasm32-unknown-unknown"
; CHECK-LABEL: store_i8_with_variable_gep_offset:
; CHECK: i32.add $push[[L0:[0-9]+]]=, $0, $1{{$}}
@@ -16,11 +16,11 @@
}
; CHECK-LABEL: store_i8_with_array_alloca_gep:
-; CHECK: i32.const $push[[L0:[0-9]+]]=, 0{{$}}
-; CHECK: i32.load $push[[L1:[0-9]+]]=, __stack_pointer($pop[[L0]]){{$}}
-; CHECK: i32.const $push[[L2:[0-9]+]]=, 32{{$}}
-; CHECK: i32.sub $push{{[0-9]+}}=, $pop[[L1]], $pop[[L2]]{{$}}
-; CHECK: i32.add $push[[L4:[0-9]+]]=, $pop{{[0-9]+}}, $0{{$}}
+; CHECK: get_global $push[[L0:[0-9]+]]=, __stack_pointer
+; CHECK: i32.const $push[[L1:[0-9]+]]=, 32{{$}}
+; CHECK: i32.sub $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}}
+; CHECK: copy_local $push[[L3:[0-9]+]]=, $pop[[L2]]
+; CHECK: i32.add $push[[L4:[0-9]+]]=, $pop[[L3]], $0{{$}}
; CHECK: i32.const $push[[L5:[0-9]+]]=, 0{{$}}
; CHECK: i32.store8 0($pop[[L4]]), $pop[[L5]]{{$}}
define hidden void @store_i8_with_array_alloca_gep(i32 %idx) {
Index: test/CodeGen/WebAssembly/negative-base-reg.ll
===================================================================
--- test/CodeGen/WebAssembly/negative-base-reg.ll
+++ test/CodeGen/WebAssembly/negative-base-reg.ll
@@ -1,16 +1,16 @@
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt | FileCheck %s
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
-target triple = "wasm32---elf"
+target triple = "wasm32-unknown-unknown"
@args = hidden local_unnamed_addr global [32 x i32] zeroinitializer, align 16
; Function Attrs: norecurse nounwind
define hidden i32 @main() local_unnamed_addr #0 {
; If LSR stops selecting a negative base reg value, then this test will no
; longer be useful as written.
-; CHECK: i32.const $0=, -128
+; CHECK: i32.const $push{{[0-9]+}}=, -128
entry:
br label %for.body
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48748.153410.patch
Type: text/x-patch
Size: 2819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180628/71dc6ea5/attachment.bin>
More information about the llvm-commits
mailing list