[llvm] d4e2693 - [WebAssembly] Run varargs codegen test with non-emscripten triple

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 13 14:32:14 PDT 2021


Author: Derek Schuff
Date: 2021-07-13T14:31:19-07:00
New Revision: d4e2693a679927a62dd738dd3bba24863dcd290a

URL: https://github.com/llvm/llvm-project/commit/d4e2693a679927a62dd738dd3bba24863dcd290a
DIFF: https://github.com/llvm/llvm-project/commit/d4e2693a679927a62dd738dd3bba24863dcd290a.diff

LOG: [WebAssembly] Run varargs codegen test with non-emscripten triple

This is a followup from D105749 to cover both triples in the case
where they differ.

Added: 
    

Modified: 
    llvm/test/CodeGen/WebAssembly/varargs.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/WebAssembly/varargs.ll b/llvm/test/CodeGen/WebAssembly/varargs.ll
index 7a9f0b08c1f43..cb582a4a58f51 100644
--- a/llvm/test/CodeGen/WebAssembly/varargs.ll
+++ b/llvm/test/CodeGen/WebAssembly/varargs.ll
@@ -1,4 +1,5 @@
-; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs | FileCheck %s
+; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs | FileCheck %s --check-prefix=CHECK --check-prefix=EMSCRIPTEN
+; RUN: llc < %s -mtriple wasm32-unknown-unknown -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs | FileCheck %s  --check-prefix=CHECK --check-prefix=UNKNOWN
 
 ; Test varargs constructs.
 
@@ -165,21 +166,40 @@ define void @nonlegal_fixed(fp128 %x, ...) nounwind {
 ; Test that an fp128 argument is properly aligned and allocated
 ; within a vararg buffer.
 
-; CHECK-LABEL: call_fp128_alignment:
-; CHECK:      global.get      $push5=, __stack_pointer
-; CHECK-NEXT: i32.const       $push6=, 32
-; CHECK-NEXT: i32.sub         $push10=, $pop5, $pop6
-; CHECK-NEXT: local.tee       $push9=, $1=, $pop10
-; CHECK-NEXT: global.set      __stack_pointer, $pop9
-; CHECK-NEXT: i32.const       $push0=, 16
-; CHECK-NEXT: i32.add         $push1=, $1, $pop0
-; CHECK-NEXT: i64.const       $push2=, -9223372036854775808
-; CHECK-NEXT: i64.store       0($pop1), $pop2
-; CHECK-NEXT: i64.const       $push3=, 1
-; CHECK-NEXT: i64.store       8($1), $pop3
-; CHECK-NEXT: i32.const       $push4=, 7
-; CHECK-NEXT: i32.store       0($1), $pop4
-; CHECK-NEXT: call            callee, $1
+; EMSCRIPTEN-LABEL: call_fp128_alignment:
+; EMSCRIPTEN:      global.get      $push5=, __stack_pointer
+; EMSCRIPTEN-NEXT: i32.const       $push6=, 32
+; EMSCRIPTEN-NEXT: i32.sub         $push10=, $pop5, $pop6
+; EMSCRIPTEN-NEXT: local.tee       $push9=, $1=, $pop10
+; EMSCRIPTEN-NEXT: global.set      __stack_pointer, $pop9
+; EMSCRIPTEN-NEXT: i32.const       $push0=, 16
+; EMSCRIPTEN-NEXT: i32.add         $push1=, $1, $pop0
+; EMSCRIPTEN-NEXT: i64.const       $push2=, -9223372036854775808
+; EMSCRIPTEN-NEXT: i64.store       0($pop1), $pop2
+; EMSCRIPTEN-NEXT: i64.const       $push3=, 1
+; EMSCRIPTEN-NEXT: i64.store       8($1), $pop3
+; EMSCRIPTEN-NEXT: i32.const       $push4=, 7
+; EMSCRIPTEN-NEXT: i32.store       0($1), $pop4
+; EMSCRIPTEN-NEXT: call            callee, $1
+
+; Alignment of fp128 is a current disagreement between emscripten and others.
+; UNKNOWN-LABEL: call_fp128_alignment:
+; UNKNOWN:      global.get      $push7=, __stack_pointer
+; UNKNOWN-NEXT: i32.const       $push8=, 32
+; UNKNOWN-NEXT: i32.sub         $push12=, $pop7, $pop8
+; UNKNOWN-NEXT: local.tee       $push11=, $1=, $pop12
+; UNKNOWN-NEXT: global.set      __stack_pointer, $pop11
+; UNKNOWN-NEXT: i32.const       $push0=, 24
+; UNKNOWN-NEXT: i32.add         $push1=, $1, $pop0
+; UNKNOWN-NEXT: i64.const       $push2=, -9223372036854775808
+; UNKNOWN-NEXT: i64.store       0($pop1), $pop2
+; UNKNOWN-NEXT: i32.const       $push3=, 16
+; UNKNOWN-NEXT: i32.add         $push4=, $1, $pop3
+; UNKNOWN-NEXT: i64.const       $push5=, 1
+; UNKNOWN-NEXT: i64.store       0($pop4), $pop5
+; UNKNOWN-NEXT: i32.const       $push6=, 7
+; UNKNOWN-NEXT: i32.store       0($1), $pop6
+; UNKNOWN-NEXT: call            callee, $1
 define void @call_fp128_alignment(i8* %p) {
 entry:
   call void (...) @callee(i8 7, fp128 0xL00000000000000018000000000000000)


        


More information about the llvm-commits mailing list