[all-commits] [llvm/llvm-project] 1de3f4: Revert "[SLP]Do not require external uses for root...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu Jan 11 02:16:04 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1de3f46938d70997cda5bcba17cbdbe166d4f269
      https://github.com/llvm/llvm-project/commit/1de3f46938d70997cda5bcba17cbdbe166d4f269
  Author: Martin Storsjö <martin at martin.st>
  Date:   2024-01-11 (Thu, 11 Jan 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/int-bitcast-minbitwidth.ll
    M llvm/test/Transforms/SLPVectorizer/X86/minbitwidth-transformed-operand.ll
    M llvm/test/Transforms/SLPVectorizer/X86/root-trunc-extract-reuse.ll

  Log Message:
  -----------
  Revert "[SLP]Do not require external uses for roots and single use for other instructions in computeMinimumValueSizes. (#72679)"

This reverts commit 408dce82016463dcb5026b2ddfc62174970a88e9.

This triggered failed asserts with code like this:

    char a[];
    short *b;
    int c, d, e, f;
    void g() {
      char *h;
      for (;;) {
        for (; f; ++f) {
          h[f] = b[0] * a[e] + b[c] * a[1] >> 7;
          ++b;
        }
        h += d;
      }
    }

Compiled like this:

    $ clang -target x86_64-linux-gnu -c repro.c -O2
    clang: ../lib/IR/Instructions.cpp:3335: static llvm::CastInst* llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed.




More information about the All-commits mailing list