[PATCH] D146121: [DAG] Move lshr narrowing from visitANDLike to SimplifyDemandedBits (WIP)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 06:36:08 PDT 2023


RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/bswap.ll:232
+; CHECK64-NEXT:    shlq $8, %rax
+; CHECK64-NEXT:    orq %rcx, %rax
 ; CHECK64-NEXT:    retq
----------------
RKSimon wrote:
> This looks to be the last regression - MatchBSwapHWordLow is very pattern specific, and can't peek through zext (or ignore AND masks for known zero bits)
I've confirmed this is fixed by adding an equivalent SHL narrowing fold in SimplifyDemandedBits, which I intend to do as a follow up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146121



More information about the llvm-commits mailing list