[PATCH] D90978: [WebAssembly] Support fp reg class in r constraint
snek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 14:57:17 PST 2020
snek created this revision.
snek added a project: LLVM.
Herald added subscribers: llvm-commits, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100, dschuff.
snek requested review of this revision.
Herald added a subscriber: aheejin.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90978
Files:
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
Index: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
@@ -562,6 +562,16 @@
if (VT.getSizeInBits() <= 64)
return std::make_pair(0U, &WebAssembly::I64RegClass);
}
+ if (VT.isFloatingPoint() && !VT.isVector()) {
+ switch (VT.getSizeInBits()) {
+ case 32:
+ return std::make_pair(0U, &WebAssembly::F32RegClass);
+ case 64:
+ return std::make_pair(0U, &WebAssembly::F64RegClass);
+ default:
+ break;
+ }
+ }
break;
default:
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90978.303558.patch
Type: text/x-patch
Size: 741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201106/c2f99810/attachment.bin>
More information about the llvm-commits
mailing list