[PATCH] D53872: [WebAssembly] Add V128 to WebAssemblyInstrInfo::copyPhysReg
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 7 18:39:09 PST 2018
This revision was automatically updated to reflect the committed changes.
tlively marked an inline comment as done.
Closed by commit rL346384: [WebAssembly] Add V128 to WebAssemblyInstrInfo::copyPhysReg (authored by tlively, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D53872?vs=172854&id=173111#toc
Repository:
rL LLVM
https://reviews.llvm.org/D53872
Files:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
llvm/trunk/test/CodeGen/WebAssembly/regcopy.mir
Index: llvm/trunk/test/CodeGen/WebAssembly/regcopy.mir
===================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/regcopy.mir
+++ llvm/trunk/test/CodeGen/WebAssembly/regcopy.mir
@@ -0,0 +1,80 @@
+# RUN: llc %s -o - -run-pass=postrapseudos | FileCheck %s
+--- |
+ target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
+ target triple = "wasm32-unknown-unknown"
+
+ define void @copy_i32() {
+ ret void
+ }
+
+ define void @copy_i64() {
+ ret void
+ }
+
+ define void @copy_f32() {
+ ret void
+ }
+
+ define void @copy_f64() {
+ ret void
+ }
+
+ define void @copy_v128() {
+ ret void
+ }
+...
+---
+name: copy_i32
+# CHECK-LABEL: copy_i32
+body: |
+ ; CHECK-LABEL: bb.0:
+ ; CHECK-NEXT: %0:i32 = COPY_I32 %1:i32
+ ; CHECK-NEXT: RETURN_VOID
+ bb.0:
+ %0:i32 = COPY %1:i32
+ RETURN_VOID implicit-def $arguments
+...
+---
+name: copy_i64
+# CHECK-LABEL: copy_i64
+body: |
+ ; CHECK-LABEL: bb.0:
+ ; CHECK-NEXT: %0:i64 = COPY_I64 %1:i64
+ ; CHECK-NEXT: RETURN_VOID
+ bb.0:
+ %0:i64 = COPY %1:i64
+ RETURN_VOID implicit-def $arguments
+...
+---
+name: copy_f32
+# CHECK-LABEL: copy_f32
+body: |
+ ; CHECK-LABEL: bb.0:
+ ; CHECK-NEXT: %0:f32 = COPY_F32 %1:f32
+ ; CHECK-NEXT: RETURN_VOID
+ bb.0:
+ %0:f32 = COPY %1:f32
+ RETURN_VOID implicit-def $arguments
+...
+---
+name: copy_f64
+# CHECK-LABEL: copy_f64
+body: |
+ ; CHECK-LABEL: bb.0:
+ ; CHECK-NEXT: %0:f64 = COPY_F64 %1:f64
+ ; CHECK-NEXT: RETURN_VOID
+ bb.0:
+ %0:f64 = COPY %1:f64
+ RETURN_VOID implicit-def $arguments
+...
+---
+name: copy_v128
+# CHECK-LABEL: copy_v128
+body: |
+ ; CHECK-LABEL: bb.0:
+ ; CHECK-NEXT: %0:v128 = COPY_V128 %1:v128
+ ; CHECK-NEXT: RETURN_VOID
+ bb.0:
+ %0:v128 = COPY %1:v128
+ RETURN_VOID implicit-def $arguments
+...
Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp
@@ -70,6 +70,8 @@
CopyOpcode = WebAssembly::COPY_F32;
else if (RC == &WebAssembly::F64RegClass)
CopyOpcode = WebAssembly::COPY_F64;
+ else if (RC == &WebAssembly::V128RegClass)
+ CopyOpcode = WebAssembly::COPY_V128;
else
llvm_unreachable("Unexpected register class");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53872.173111.patch
Type: text/x-patch
Size: 2445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181108/02519574/attachment.bin>
More information about the llvm-commits
mailing list