[llvm] [LLVM] Add `llvm.masked.compress` intrinsic (PR #92289)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 04:21:52 PDT 2024


================
@@ -6279,7 +6279,9 @@ SDValue SelectionDAG::FoldConstantArithmetic(unsigned Opcode, const SDLoc &DL,
   // We can't create a scalar CONCAT_VECTORS so skip it. It will break
   // for concats involving SPLAT_VECTOR. Concats of BUILD_VECTORS are handled by
   // foldCONCAT_VECTORS in getNode before this is called.
-  if (Opcode >= ISD::BUILTIN_OP_END || Opcode == ISD::CONCAT_VECTORS)
+  // MCOMPRESS is not defined for scalars. We handle constants before this call.
+  if (Opcode >= ISD::BUILTIN_OP_END || Opcode == ISD::CONCAT_VECTORS ||
+      Opcode == ISD::MCOMPRESS)
----------------
lukel97 wrote:

Yikes, thanks for the explanation. I don't have much of an opinion on how to handle the other ops but I think what you have here for MCOMPRESS is perfectly reasonable. We shouldn't worry about the others in this PR

https://github.com/llvm/llvm-project/pull/92289


More information about the llvm-commits mailing list