[PATCH] D62871: [Codegen] (X & (C l>>/<< Y)) ==/!= 0 --> ((X <</l>> Y) & C) ==/!= 0 fold

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 04:44:46 PDT 2019


lebedev.ri marked an inline comment as done.
lebedev.ri added inline comments.


================
Comment at: test/CodeGen/X86/hoist-and-by-const-from-shl-in-eqcmp-zero.ll:740
+; X64-NEXT:    pcmpeqd %xmm3, %xmm2
+; X64-NEXT:    movdqa %xmm2, %xmm0
 ; X64-NEXT:    retq
----------------
lebedev.ri wrote:
> RKSimon wrote:
> > please can you run this through llvm-mca to compare perf?
> While this isn't what you asked, i can tell you right away that both variants are very far from optimal:
> https://godbolt.org/z/6dKBNR
Hm, i was looking at that wrong, of course that isn't identical,
because those sse/sse2 shifts all shift all elements by the same amount.

mca: https://godbolt.org/z/PQrkhj
(i did not ensure strictly sequential execution though)


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62871





More information about the llvm-commits mailing list