[all-commits] [llvm/llvm-project] 183110: [InstCombine] Do not fold `shufflevector(select)` ...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Mon Oct 28 19:39:29 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 18311093abe6481388a0d963d58438d743b47569
      https://github.com/llvm/llvm-project/commit/18311093abe6481388a0d963d58438d743b47569
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-10-29 (Tue, 29 Oct 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/test/Transforms/InstCombine/vec_shuffle.ll

  Log Message:
  -----------
  [InstCombine] Do not fold `shufflevector(select)` if the select condition is a vector (#113993)

Since `shufflevector` is not element-wise, we cannot do fold it into
select when the select condition is a vector.
For shufflevector that doesn't change the length, it doesn't crash, but
it is still a miscompilation: https://alive2.llvm.org/ce/z/s8saCx

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



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