[llvm] [WebAssembly] Fix SELECT_CC lowering for reference types (PR #181622)
Hood Chatham via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 18 11:10:59 PST 2026
================
@@ -370,6 +365,16 @@ WebAssemblyTargetLowering::WebAssemblyTargetLowering(
for (auto Op : {ISD::BR_CC, ISD::SELECT_CC})
setOperationAction(Op, T, Expand);
+ // There is no vector conditional select instruction
+ for (auto T :
+ {MVT::v16i8, MVT::v8i16, MVT::v4i32, MVT::v4f32, MVT::v2i64, MVT::v2f64})
+ setOperationAction(ISD::SELECT_CC, T, Expand);
+
+ // Reference types need SELECT_CC to be expanded to SELECT as well.
+ if (Subtarget->hasReferenceTypes())
+ for (auto T : {MVT::externref, MVT::funcref})
+ setOperationAction(ISD::SELECT_CC, T, Expand);
----------------
hoodmane wrote:
Sure, makes sense to me and then we can combine the two loops.
https://github.com/llvm/llvm-project/pull/181622
More information about the llvm-commits
mailing list