[all-commits] [llvm/llvm-project] 614fab: [X86] PromoteMaskArithmetic - share the same SDLoc...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Feb 9 04:24:42 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 614fab49b0b47c6463fb4d9d788790345bfdb6ce
      https://github.com/llvm/llvm-project/commit/614fab49b0b47c6463fb4d9d788790345bfdb6ce
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-02-09 (Fri, 09 Feb 2024)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp

  Log Message:
  -----------
  [X86] PromoteMaskArithmetic - share the same SDLoc argument instead of recreating it over and over again.


  Commit: 047f8321f14a53caad7b564f7f654a470fdca8a9
      https://github.com/llvm/llvm-project/commit/047f8321f14a53caad7b564f7f654a470fdca8a9
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-02-09 (Fri, 09 Feb 2024)

  Changed paths:
    M llvm/test/CodeGen/X86/ctpop-mask.ll

  Log Message:
  -----------
  [X86] ctpop-mask.ll - add 32-bit with SSE2 test coverage

32-bit targets will try to use SSE2 <2 x i64> CTPOP expansion for i64 CTPOP


  Commit: 9ba265636f3310b5b5b39767715e1843a06ea603
      https://github.com/llvm/llvm-project/commit/9ba265636f3310b5b5b39767715e1843a06ea603
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-02-09 (Fri, 09 Feb 2024)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/ctpop-mask.ll

  Log Message:
  -----------
  [X86] ReplaceNodeResults - shrink i64 CTPOP to (shifted) CTPOP i32 if 32 or less active bits to avoid SSE2 codegen

32-bit targets perform i64 CTPOP as a v2i64 CTPOP - if we can perform this as a i32 CTPOP by shifting the source bits, then do so to avoid the gpr<->xmm

This also triggers on non-SSE2 capable targets, as can be seen with the minor codegen diffs in ctpop_shifted_mask16


Compare: https://github.com/llvm/llvm-project/compare/b5a273a1cfe6...9ba265636f33


More information about the All-commits mailing list