summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2018-11-09 01:38:44 +0000
committerThomas Lively <tlively@google.com>2018-11-09 01:38:44 +0000
commit38c902bc2e50c000fef9aa47f1426be974383a00 (patch)
tree972977aeb944c87406cd25551880f556883c81af /llvm/lib/Target
parentec54d6121caceaa17aac6b16d8eb00717a66f54a (diff)
downloadbcm5719-llvm-38c902bc2e50c000fef9aa47f1426be974383a00.tar.gz
bcm5719-llvm-38c902bc2e50c000fef9aa47f1426be974383a00.zip
[WebAssembly] Lower select for vectors
Summary: Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D53675 llvm-svn: 346462
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
index 578d23570f8..46f8877198c 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
@@ -156,14 +156,15 @@ WebAssemblyTargetLowering::WebAssemblyTargetLowering(
setOperationAction(Op, MVT::v2i64, Custom);
}
- // There is no select instruction for vectors
- if (Subtarget->hasSIMD128()) {
- for (auto T : {MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v4f32})
- setOperationAction(ISD::VSELECT, T, Expand);
- if (EnableUnimplementedWasmSIMDInstrs)
- for (auto T : {MVT::v2i64, MVT::v2f64})
- setOperationAction(ISD::VSELECT, T, Expand);
- }
+ // There are no select instructions for vectors
+ if (Subtarget->hasSIMD128())
+ for (auto Op : {ISD::VSELECT, ISD::SELECT_CC, ISD::SELECT}) {
+ for (auto T : {MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v4f32})
+ setOperationAction(Op, T, Expand);
+ if (EnableUnimplementedWasmSIMDInstrs)
+ for (auto T : {MVT::v2i64, MVT::v2f64})
+ setOperationAction(Op, T, Expand);
+ }
// As a special case, these operators use the type to mean the type to
// sign-extend from.
OpenPOWER on IntegriCloud