[all-commits] [llvm/llvm-project] 8efee5: [InstCombine] limit pair-of-insertelement folds to...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Thu Dec 15 05:28:28 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8efee510be3c2dd02db0b070055aedf095a3acce
      https://github.com/llvm/llvm-project/commit/8efee510be3c2dd02db0b070055aedf095a3acce
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-12-15 (Thu, 15 Dec 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/test/Transforms/InstCombine/insertelt-trunc.ll

  Log Message:
  -----------
  [InstCombine] limit pair-of-insertelement folds to avoid miscompile

This transform was added with 4446f71ce392. However, as noted in
the post-commit feedback, the transform is not safe with an
arbitrary base vector because we may leak poison from a narrow
element into an adjacent element when bitcasting.

I made the least invasive code change in case we do figure out
a way to make this safe.




More information about the All-commits mailing list