[all-commits] [llvm/llvm-project] 992ca7: [VectorCombine] Pass flags during IR creation (#19...

Jack Huang via All-commits all-commits at lists.llvm.org
Mon Sep 28 23:33:19 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 992ca79c83b0882465a202883109bd4cd167ec00
      https://github.com/llvm/llvm-project/commit/992ca79c83b0882465a202883109bd4cd167ec00
  Author: Jack Huang <jackhuang1205 at gmail.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/VectorCombine/binop-scalarize.ll
    A llvm/test/Transforms/VectorCombine/cmp-scalarize.ll
    M llvm/test/Transforms/VectorCombine/unary-op-scalarize.ll

  Log Message:
  -----------
  [VectorCombine] Pass flags during IR creation (#193271)

Since commit 777d6b5, VectorCombine has been using InstSimplifyFolder to
simplify vector instructions during IR construction. When creating a new
instruction, InstSimplifyFolder may fold the operation and return an
existing operand instead of emitting a new instruction.

In such cases, copying IR flags to the returned value is incorrect and
may unintentionally propagate flags to pre‑existing instructions,
polluting the original IR. To avoid this, flags should be passed at IR
creation rather than being set after construction. Fix #192607.



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