[PATCH] D114357: [CodeGen] Change getAnyExtOrTrunc to use SIGN_EXTEND for some constants

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 24 02:23:00 PST 2021


david-arm added inline comments.


================
Comment at: llvm/test/CodeGen/X86/vector-shift-shl-512.ll:334
 ; AVX512BW-NEXT:    vpunpcklbw {{.*#+}} zmm0 = zmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,32,32,33,33,34,34,35,35,36,36,37,37,38,38,39,39,48,48,49,49,50,50,51,51,52,52,53,53,54,54,55,55]
-; AVX512BW-NEXT:    vpsllvw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %zmm0
+; AVX512BW-NEXT:    vpmullw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %zmm0
 ; AVX512BW-NEXT:    vpandq %zmm2, %zmm0, %zmm0
----------------
lebedev.ri wrote:
> peterwaller-arm wrote:
> > Can anyone comment if these sll -> mul changes are expected & harmless?
> These look like regressions to me.
Hi @lebedev.ri, thanks for providing input here. Do you know if this means that there is a latent bug in the code where we should be explicitly using zero-extend here? I'm worried about cases where code is relying upon getAnyExtOrTrunc zero-extending.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114357



More information about the llvm-commits mailing list