Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit b1c6e08

Browse files
committed
[WebAssembly] Lower select for vectors
Summary: Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D53675 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346462 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 409a350 commit b1c6e08

File tree

3 files changed

+472
-98
lines changed

3 files changed

+472
-98
lines changed

lib/Target/WebAssembly/WebAssemblyISelLowering.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,15 @@ WebAssemblyTargetLowering::WebAssemblyTargetLowering(
156156
setOperationAction(Op, MVT::v2i64, Custom);
157157
}
158158

159-
// There is no select instruction for vectors
160-
if (Subtarget->hasSIMD128()) {
161-
for (auto T : {MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v4f32})
162-
setOperationAction(ISD::VSELECT, T, Expand);
163-
if (EnableUnimplementedWasmSIMDInstrs)
164-
for (auto T : {MVT::v2i64, MVT::v2f64})
165-
setOperationAction(ISD::VSELECT, T, Expand);
166-
}
159+
// There are no select instructions for vectors
160+
if (Subtarget->hasSIMD128())
161+
for (auto Op : {ISD::VSELECT, ISD::SELECT_CC, ISD::SELECT}) {
162+
for (auto T : {MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v4f32})
163+
setOperationAction(Op, T, Expand);
164+
if (EnableUnimplementedWasmSIMDInstrs)
165+
for (auto T : {MVT::v2i64, MVT::v2f64})
166+
setOperationAction(Op, T, Expand);
167+
}
167168

168169
// As a special case, these operators use the type to mean the type to
169170
// sign-extend from.

0 commit comments

Comments
 (0)