[llvm] [LV] Check isPredInst instead of isScalarWithPred in uniform analysis. (PR #98892)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 01:29:53 PDT 2024


================
@@ -9482,6 +9483,8 @@ void VPInterleaveRecipe::execute(VPTransformState &State) {
 void VPReplicateRecipe::execute(VPTransformState &State) {
   Instruction *UI = getUnderlyingInstr();
   if (State.Instance) { // Generate a single instance.
+    assert((State.VF.isScalar() || !isUniform()) &&
+           "uniform recipe shouldn't be predicated");
----------------
fhahn wrote:

Added in 371777695fe1b5407753ef2232d1b73014d3e501 in handleReplication. There is some additional code there that converts predicated assumes to uniform for scalable vectors which may should be revisited. (Predicated assumes are later removed by a VPlan-to-VPlan transform)

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


More information about the llvm-commits mailing list