[all-commits] [llvm/llvm-project] 9fe1f2: [VPlan] Set flags when constructing zexts using VP...

Luke Lau via All-commits all-commits at lists.llvm.org
Mon Oct 20 03:39:38 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9fe1f29541109ac10e1399deb85da0507135f836
      https://github.com/llvm/llvm-project/commit/9fe1f29541109ac10e1399deb85da0507135f836
  Author: Luke Lau <luke at igalia.com>
  Date:   2025-10-20 (Mon, 20 Oct 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
    M llvm/test/Transforms/LoopVectorize/cse-casts.ll

  Log Message:
  -----------
  [VPlan] Set flags when constructing zexts using VPWidenCastRecipe (#164198)

createWidenCast doesn't set the flag type, so when we simplify trunc
(zext nneg x) -> zext x we would hit an assertion in CSE that the flag
types don't match with other VPWidenCastRecipes that weren't simplified.

This fixes it the same way trunc flags are handled too.

As an aside I think it should be correct to preserve the nneg flag in
this case since the input operand is still non-negative after the
transform. But that's left to another PR.

Fixes https://github.com/llvm/llvm-project/issues/164171



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list