[PATCH] D106679: [WIP][X86] Move shl(x, 1) -> add(x, x) vector fold to ISEL (PR50468)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 24 04:44:00 PDT 2021


RKSimon marked an inline comment as done.
RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/stack-folding-int-avx512.ll:6315
 ; CHECK-NEXT:    #NO_APP
-; CHECK-NEXT:    vpslld $1, {{[-0-9]+}}(%r{{[sb]}}p), %zmm0 # 64-byte Folded Reload
+; CHECK-NEXT:    vmovdqu64 {{[-0-9]+}}(%r{{[sb]}}p), %zmm0 # 64-byte Reload
+; CHECK-NEXT:    vpaddd %zmm0, %zmm0, %zmm0
----------------
craig.topper wrote:
> This is a bit sad. Would it make sense to convert add back to shift when folding a load?
It would, although I'm struggling to think of a way to do that - foldMemoryOperandImpl won't ever get the chance.

Another option is we just remove the ISEL patterns from AVX512 targets entirely.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106679/new/

https://reviews.llvm.org/D106679



More information about the llvm-commits mailing list