[all-commits] [llvm/llvm-project] 10c256: Revert "[X86] Fold shuffle(not(x), undef) -> not(sh...

Benjamin Kramer via All-commits all-commits at lists.llvm.org
Tue Mar 2 02:29:19 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 10c256ccaf520eed766f594f897b5bafdc8061ae
      https://github.com/llvm/llvm-project/commit/10c256ccaf520eed766f594f897b5bafdc8061ae
  Author: Benjamin Kramer <benny.kra at googlemail.com>
  Date:   2021-03-02 (Tue, 02 Mar 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/combine-bitselect.ll
    M llvm/test/CodeGen/X86/promote-cmp.ll

  Log Message:
  -----------
  Revert "[X86] Fold shuffle(not(x),undef) -> not(shuffle(x,undef))"

This reverts commit 925093d88ae74560a8e94cf66f95d60ea3ffa2d3.

Causes an infinite loop when compiling some shuffles:

$ cat bugpoint-reduced-simplified.ll
target triple = "x86_64-unknown-linux-gnu"

define void @foo() {
entry:
  %0 = load i8, i8* undef, align 1
  %broadcast.splatinsert = insertelement <16 x i8> poison, i8 %0, i32 0
  %1 = icmp ne <16 x i8> %broadcast.splatinsert, zeroinitializer
  %2 = shufflevector <16 x i1> %1, <16 x i1> undef, <16 x i32> zeroinitializer
  %wide.load = load <16 x i8>, <16 x i8>* undef, align 1
  %3 = icmp ne <16 x i8> %wide.load, zeroinitializer
  %4 = and <16 x i1> %3, %2
  %5 = zext <16 x i1> %4 to <16 x i8>
  store <16 x i8> %5, <16 x i8>* undef, align 1
  ret void
}

$ llc < bugpoint-reduced-simplified.ll
<timeout>




More information about the All-commits mailing list