[flang-commits] [clang] [libcxxabi] [llvm] [libclc] [lld] [flang] [lldb] [libcxx] [libc] [clang-tools-extra] [compiler-rt] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)

via flang-commits flang-commits at lists.llvm.org
Thu Jan 25 07:55:17 PST 2024


================
@@ -1469,6 +1461,52 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent,
 }
 #endif
 
+static bool isUniformAcrossVFsAndUFs(VPScalarCastRecipe *C) {
+  return C->isDefinedOutsideVectorRegions() ||
+         isa<VPDerivedIVRecipe>(C->getOperand(0)) ||
+         isa<VPCanonicalIVPHIRecipe>(C->getOperand(0));
+}
+
+Value *VPScalarCastRecipe ::generate(VPTransformState &State, unsigned Part) {
+  assert(vputils::onlyFirstLaneUsed(this) &&
+         "Codegen only implemented for first lane.");
+  switch (Opcode) {
+  case Instruction::SExt:
+  case Instruction::ZExt:
----------------
ayalz wrote:

Would be good to either remove or make a note that SExt and ZExt are currently unused/dead cases.

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


More information about the flang-commits mailing list