[all-commits] [llvm/llvm-project] 9452ec: [X86][SSE] Fix typo + infinite-loop in HOP(HOP'(X, ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Oct 2 07:35:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9452ec722ce0ba356a5ad178b0b1964ba8efb534
      https://github.com/llvm/llvm-project/commit/9452ec722ce0ba356a5ad178b0b1964ba8efb534
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-10-02 (Sat, 02 Oct 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/horizontal-shuffle-2.ll
    M llvm/test/CodeGen/X86/horizontal-sum.ll

  Log Message:
  -----------
  [X86][SSE] Fix typo + infinite-loop in HOP(HOP'(X,X),HOP'(Y,Y)) fold (PR52040)

PR52040 identified several issues with the HOP(HOP'(X,X),HOP'(Y,Y)) -> HOP(PERMUTE(HOP'(X,Y)),PERMUTE(HOP'(X,Y)) slow-HOP fold.

Not only was there a copy+paste typo when accessing the inner HOP operands, but the (unnecessary) ReplaceAllUsesOfValueWith call was missing one use checks.

Now that we have better shuffle combines of HOPs we can just return a new HOP() sequence and not use ReplaceAllUsesOfValueWith at all - this actually improved pair_sum_v8i32_v4i32 codegen as it kicks off further shuffle combines.




More information about the All-commits mailing list