diff options
author | Dan Gohman <dan433584@gmail.com> | 2017-02-22 16:28:00 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2017-02-22 16:28:00 +0000 |
commit | a63e8eb13865c02028c5a0b387a7be5837bf7665 (patch) | |
tree | 2cb9997f87c5e8680b56f62a60d37efb5bf8a715 /llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | |
parent | 8e48f416ad5f952d7421e3d4076565230e499770 (diff) | |
download | bcm5719-llvm-a63e8eb13865c02028c5a0b387a7be5837bf7665.tar.gz bcm5719-llvm-a63e8eb13865c02028c5a0b387a7be5837bf7665.zip |
[WebAssembly] Configure codegen to legalize f16 values.
llvm-svn: 295850
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index 6a7f75a6b3a..9c8de79866f 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -95,6 +95,11 @@ WebAssemblyTargetLowering::WebAssemblyTargetLowering( // Support minnan and maxnan, which otherwise default to expand. setOperationAction(ISD::FMINNAN, T, Legal); setOperationAction(ISD::FMAXNAN, T, Legal); + // WebAssembly currently has no builtin f16 support. + setOperationAction(ISD::FP16_TO_FP, T, Expand); + setOperationAction(ISD::FP_TO_FP16, T, Expand); + setLoadExtAction(ISD::EXTLOAD, T, MVT::f16, Expand); + setTruncStoreAction(T, MVT::f16, Expand); } for (auto T : {MVT::i32, MVT::i64}) { |